Skip to content

Commit 28b940b

Browse files
authored
Merge pull request #49 from mekanix/feature/fix-tests
Default to SQL if not explicitly specified
2 parents 647ee39 + 00f30b5 commit 28b940b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/conftest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import os
22

3-
from freenit import create_app
3+
import pytest
44
from peewee_migrate import Router
55
from peewee_migrate.router import DEFAULT_MIGRATE_DIR
66
from pytest_factoryboy import register
77

8-
import pytest
98
from config import configs
9+
from freenit import create_app
1010

1111
from .factories import AdminFactory, RoleFactory, UserFactory
1212

@@ -17,7 +17,7 @@
1717

1818
@pytest.fixture
1919
def app():
20-
dbtype = os.environ['DBTYPE']
20+
dbtype = os.environ.get('DBTYPE', 'sql')
2121
config = configs['testing']
2222
flask_app = create_app(config, dbtype=dbtype)
2323
if dbtype == 'sql':

0 commit comments

Comments
 (0)