Created
March 14, 2018 15:19
-
-
Save nguyendv/84acda790ea48924b068c2b7c347ca2d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@pytest.fixture | |
def db_conn(): | |
conn = psycopg2.connect("dbname=test user=postgres") | |
return conn | |
def test_foo(db_conn): | |
result = db_conn.execute(a_sql_statement) | |
assert result == expected_value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment