

class TestGenSql:

    def test_gen_drop_statement(self):
        pass

    def test_create_statement(self):
        pass

import sys
from io import StringIO

from pg_bawler import gen_sql


def test_simple_main(monkeypatch):
    stdout = StringIO()
    monkeypatch.setattr(sys, 'stdout', stdout)

    class Args:
        tablename = 'foo'

    gen_sql.main(*[Args.tablename])
    sql = stdout.getvalue()

    assert gen_sql.TRIGGER_FN_FMT.format(args=Args) in sql
    assert gen_sql.TRIGGER_FN_FMT.format(args=Args) in sql

Add simple test for sql full sql generation with only tablename
Add simple test for sql full sql generation with only tablename

+ import sys
+ from io import StringIO
+ 
+ from pg_bawler import gen_sql
  
  
- class TestGenSql:
+ def test_simple_main(monkeypatch):
+     stdout = StringIO()
+     monkeypatch.setattr(sys, 'stdout', stdout)
  
-     def test_gen_drop_statement(self):
-         pass
+     class Args:
+         tablename = 'foo'
  
-     def test_create_statement(self):
-         pass
+     gen_sql.main(*[Args.tablename])
+     sql = stdout.getvalue()
  
+     assert gen_sql.TRIGGER_FN_FMT.format(args=Args) in sql
+     assert gen_sql.TRIGGER_FN_FMT.format(args=Args) in sql
+ 
Add simple test for sql full sql generation with only tablename
## Code Before:


class TestGenSql:

    def test_gen_drop_statement(self):
        pass

    def test_create_statement(self):
        pass

## Instruction:
Add simple test for sql full sql generation with only tablename
## Code After:
import sys
from io import StringIO

from pg_bawler import gen_sql


def test_simple_main(monkeypatch):
    stdout = StringIO()
    monkeypatch.setattr(sys, 'stdout', stdout)

    class Args:
        tablename = 'foo'

    gen_sql.main(*[Args.tablename])
    sql = stdout.getvalue()

    assert gen_sql.TRIGGER_FN_FMT.format(args=Args) in sql
    assert gen_sql.TRIGGER_FN_FMT.format(args=Args) in sql
