dont let people accidentally delete their local database by forcing it to run against a different DB (ie test_notifications_api)

This commit is contained in:
Leo Hemsted
2016-11-08 13:48:14 +00:00
parent 089ac099f3
commit f6de17d6b7

View File

@@ -33,6 +33,8 @@ def client(notify_api):
@pytest.fixture(scope='session')
def notify_db(notify_api, request):
assert db.engine.url.database != 'notification_api', 'dont run tests against main db'
Migrate(notify_api, db)
Manager(db, MigrateCommand)
BASE_DIR = os.path.dirname(os.path.dirname(__file__))