Skip to content

Commit

Permalink
issue #142 - we should never need metadata.reflect()
Browse files Browse the repository at this point in the history
  • Loading branch information
jantman committed Oct 31, 2017
1 parent 5745afb commit 3c9b380
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ class TestBaseTmplUnreconciledNotification(AcceptanceHelper):

def test_00_clean_db(self, testdb):
# clean the database
biweeklybudget.models.base.Base.metadata.reflect(engine)
biweeklybudget.models.base.Base.metadata.drop_all(engine)
biweeklybudget.models.base.Base.metadata.create_all(engine)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ class TestIndexPayPeriods(AcceptanceHelper):

def test_0_clean_db(self, testdb):
# clean the database
biweeklybudget.models.base.Base.metadata.reflect(engine)
biweeklybudget.models.base.Base.metadata.drop_all(engine)
biweeklybudget.models.base.Base.metadata.create_all(engine)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ class TestPayPeriodsIndex(AcceptanceHelper):

def test_0_clean_db(self, testdb):
# clean the database
biweeklybudget.models.base.Base.metadata.reflect(engine)
biweeklybudget.models.base.Base.metadata.drop_all(engine)
biweeklybudget.models.base.Base.metadata.create_all(engine)

Expand Down Expand Up @@ -535,7 +534,6 @@ class TestPayPeriodOtherPeriodInfo(AcceptanceHelper):

def test_0_clean_db(self, testdb):
# clean the database
biweeklybudget.models.base.Base.metadata.reflect(engine)
biweeklybudget.models.base.Base.metadata.drop_all(engine)
biweeklybudget.models.base.Base.metadata.create_all(engine)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ def get_reconciled(self, driver):

def test_00_clean_db(self, testdb):
# clean the database
biweeklybudget.models.base.Base.metadata.reflect(engine)
biweeklybudget.models.base.Base.metadata.drop_all(engine)
biweeklybudget.models.base.Base.metadata.create_all(engine)

Expand Down Expand Up @@ -1446,7 +1445,6 @@ def get_reconciled(self, driver):

def test_00_clean_db(self, testdb):
# clean the database
biweeklybudget.models.base.Base.metadata.reflect(engine)
biweeklybudget.models.base.Base.metadata.drop_all(engine)
biweeklybudget.models.base.Base.metadata.create_all(engine)

Expand Down
3 changes: 1 addition & 2 deletions biweeklybudget/tests/acceptance/test_biweeklypayperiod.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,8 @@ def test_3_ignore_scheduled_converted_to_real_trans(self, testdb):
@pytest.mark.usefixtures('class_refresh_db', 'refreshdb')
class TestSums(AcceptanceHelper):

def test_0_clean_db(self, testdb):
def test_0_clean_db(self):
# clean the database
biweeklybudget.models.base.Base.metadata.reflect(engine)
biweeklybudget.models.base.Base.metadata.drop_all(engine)
biweeklybudget.models.base.Base.metadata.create_all(engine)

Expand Down
1 change: 0 additions & 1 deletion biweeklybudget/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ def refreshdb(dump_file_path):
conn = engine.connect()
logger.info('Refreshing DB (session-scoped)')
# clean the database
biweeklybudget.models.base.Base.metadata.reflect(engine)
biweeklybudget.models.base.Base.metadata.drop_all(engine)
biweeklybudget.models.base.Base.metadata.create_all(engine)
# load the sample data
Expand Down

0 comments on commit 3c9b380

Please sign in to comment.