Skip to content

Commit

Permalink
Run fixture sql injection via session
Browse files Browse the repository at this point in the history
  • Loading branch information
Digant C Kasundra committed May 13, 2015
1 parent 5c74ad2 commit c890662
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/model_tests/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ def fin():
return session

@pytest.fixture
def sample_data1(db_engine):
def sample_data1(session):
sql_file = open('tests/sample_data/sample_data1.sql')
sql = sql_file.read()
for statement in sql.split(";"):
scrubbed = re.sub(r'[\t\n]', ' ', statement)
db_engine.execute(scrubbed)
session.execute(scrubbed)

0 comments on commit c890662

Please sign in to comment.