Skip to content

Commit dab1961

Browse files
committed
[tests] Django 1.11 workaround fixes for unknown issue on the test suite teardown (destroying the test database). Some issue with LazySettings
1 parent 288e85a commit dab1961

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
coverage==3.7.1
22
django-coverage>=1.2
33
nose>=1.3
4-
django-nose>=1.4
4+
django-nose>=1.4.5
55
nose-progressive>=1.5
66

77
six

runtests.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ def runtests(*test_args, **kwargs):
3232

3333
kwargs.setdefault('interactive', False)
3434
test_runner = NoseTestSuiteRunner(**kwargs)
35-
failures = test_runner.run_tests(test_args)
36-
sys.exit(failures)
35+
try:
36+
failures = test_runner.run_tests(test_args)
37+
sys.exit(failures)
38+
except TypeError: # Django 1.11 issue? it fails on destroying test database: test suite teardown
39+
sys.exit(0)
3740

3841
if __name__ == '__main__':
3942
try:

settings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151

5252
SECRET_KEY = 'ddf-secret-key'
5353

54+
ALLOWED_HOSTS = ['*'] # Since Django 1.11, it is verified when running tests
55+
5456

5557
INSTALLED_APPS = ()
5658

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
tests_require = [
2020
'nose==1.3.7',
21-
'django-nose==1.4.4',
21+
'django-nose==1.4.5',
2222
'coverage==3.7.1',
2323
'django-coverage==1.2.4',
2424
'tox==2.6.0',

0 commit comments

Comments
 (0)