Skip to content

Commit b593b83

Browse files
committed
Use django-nose for API tests
this is a workaround for pytest-dev/pytest-django#353, pytest-dev/pytest-django#329 and #121.
1 parent 4042eba commit b593b83

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

requirements/devel.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ factory_boy
1111
mock
1212
django-extensions
1313
pydot
14+
# workaround for api tests
15+
django-nose
16+
django-coverage

setup.cfg

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,9 @@ python_files = tests.py tests/test_*.py
1818
python_classes = *xxxxxxxxx*
1919

2020
addopts = -Wd --cov=tcms/ --cov=tcms_api/ --cov-report=term
21+
22+
[nosetests]
23+
with-coverage = 0
24+
cover-erase = 0
25+
cover-package = tcms,tcms_api
26+
nologcapture = 1

tcms/settings/test/api.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from tcms.settings.test import * # noqa: F403
2+
3+
4+
INSTALLED_APPS += ('django_nose',) # noqa: F405
5+
6+
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'

0 commit comments

Comments
 (0)