For all tests - use debug db, not the 'production db'

pull/24/head^2
Michael Egorov 2017-09-05 16:08:30 -07:00
parent abfbdc7c16
commit a6be3fb1d9
2 changed files with 6 additions and 4 deletions

6
tests/conftest.py Normal file
View File

@ -0,0 +1,6 @@
import nkms.db
def pytest_runtest_setup(item):
# Monkey-patching for tests so that we don't overwrite the default db
nkms.db.DB_NAME = 'debug-rekeys-db'

View File

@ -1,11 +1,7 @@
import nkms.db
from nkms.db import DB
import shutil
import pytest
# Monkey-patching for tests so that we don't overwrite the default db
nkms.db.DB_NAME = 'debug-rekeys-db'
def test_db():
db = DB()