Guest User

Untitled

a guest
Mar 23rd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. @pytest.fixture
  2. def db_conn():
  3. conn = psycopg2.connect("dbname=test user=postgres")
  4. return conn
  5.  
  6. def test_foo(db_conn):
  7. result = db_conn.execute(a_sql_statement)
  8. assert result == expected_value
Add Comment
Please, Sign In to add comment