mirror of
https://github.com/GSA/notifications-api.git
synced 2026-05-03 07:40:19 -04:00
Updated the Provider stats and rates DAO objects to query based on the identifier in the ProviderDetails object.
- updated all tests - changed teardown to leave provider details rows on end of individual tests
This commit is contained in:
@@ -41,6 +41,7 @@ def notify_db(notify_api, request):
|
||||
db.session.remove()
|
||||
db.drop_all()
|
||||
db.engine.execute("drop table alembic_version")
|
||||
db.engine.execute("drop type providers")
|
||||
db.get_engine(notify_api).dispose()
|
||||
|
||||
request.addfinalizer(teardown)
|
||||
@@ -52,7 +53,8 @@ def notify_db_session(request):
|
||||
def teardown():
|
||||
db.session.remove()
|
||||
for tbl in reversed(meta.sorted_tables):
|
||||
db.engine.execute(tbl.delete())
|
||||
if tbl.name not in ["provider_details"]:
|
||||
db.engine.execute(tbl.delete())
|
||||
db.session.commit()
|
||||
|
||||
meta = MetaData(bind=db.engine, reflect=True)
|
||||
|
||||
Reference in New Issue
Block a user