From ea92d505826aa19c3681884ac5022dcdadf0c20e Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Thu, 23 Jun 2016 15:41:25 +0100 Subject: [PATCH] Resolve tests against Django master (#4218) --- tests/test_versioning.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_versioning.py b/tests/test_versioning.py index d4d8cfccb..5b77e8263 100644 --- a/tests/test_versioning.py +++ b/tests/test_versioning.py @@ -85,6 +85,7 @@ class TestRequestVersion: response = view(request) assert response.data == {'version': None} + @override_settings(ALLOWED_HOSTS=['*']) def test_host_name_versioning(self): scheme = versioning.HostNameVersioning view = RequestVersionView.as_view(versioning_class=scheme) @@ -173,6 +174,7 @@ class TestURLReversing(URLPatternsTestCase): response = view(request) assert response.data == {'url': 'http://testserver/another/'} + @override_settings(ALLOWED_HOSTS=['*']) def test_reverse_host_name_versioning(self): scheme = versioning.HostNameVersioning view = ReverseView.as_view(versioning_class=scheme) @@ -223,6 +225,7 @@ class TestInvalidVersion: response = view(request) assert response.status_code == status.HTTP_404_NOT_FOUND + @override_settings(ALLOWED_HOSTS=['*']) def test_invalid_host_name_versioning(self): scheme = versioning.HostNameVersioning view = RequestInvalidVersionView.as_view(versioning_class=scheme)