From f6de17d6b73284dcf111673d919b14bdab4be67a Mon Sep 17 00:00:00 2001 From: Leo Hemsted Date: Tue, 8 Nov 2016 13:48:14 +0000 Subject: [PATCH] dont let people accidentally delete their local database by forcing it to run against a different DB (ie test_notifications_api) --- tests/conftest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index 11f570de5..b8094852c 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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__))