Skip to content

Commit 86f2c95

Browse files
committed
fixes tests configuration
1 parent 2685e1c commit 86f2c95

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

.coveragerc

+1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ omit =
66
test_settings
77
*migrations*
88
*admin.py
9+
*apps.py
910
*static*
1011
*templates*

conftest.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@
88
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'test_settings')
99

1010

11-
@pytest.fixture(autouse=True)
12-
def enable_db_access_for_all_tests(transactional_db): # pylint: disable=unused-argument
13-
pass
14-
15-
1611
# `pytest` automatically calls this function once when tests are run.
1712
def pytest_configure():
1813
settings.DEBUG = False
@@ -24,3 +19,8 @@ def pytest_configure():
2419
django.setup()
2520
# Note: In Django =< 1.6 you'll need to run this instead
2621
# settings.configure()
22+
23+
24+
@pytest.fixture(autouse=True)
25+
def enable_db_access_for_all_tests(db): # pylint: disable=unused-argument
26+
pass

requirements/test.txt

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ model-mommy==1.5.1
1111
pluggy==0.6.0 # via pytest
1212
py==1.5.2 # via pytest
1313
pytest-cov==2.5.1
14+
pytest-django==3.1.2
1415
pytest==3.4.1 # via pytest-cov, pytest-django
1516
pytz==2018.3 # via django
1617
six==1.11.0 # via model-mommy, pytest, six

0 commit comments

Comments
 (0)