From 7fa8aea8dd971df9c055dae11d9d95b07320d7af Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Mon, 8 Feb 2016 09:52:39 -0500 Subject: [PATCH] Made @override_settings(ROOT_URLCONF=...) consistent. --- tests/admin_utils/test_logentry.py | 2 +- tests/admin_widgets/tests.py | 3 +-- tests/generic_inline_admin/tests.py | 4 ++-- tests/view_tests/tests/test_csrf.py | 2 +- tests/view_tests/tests/test_debug.py | 4 ++-- tests/wsgi/tests.py | 2 +- 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/tests/admin_utils/test_logentry.py b/tests/admin_utils/test_logentry.py index 1442c8f2c3..77983730af 100644 --- a/tests/admin_utils/test_logentry.py +++ b/tests/admin_utils/test_logentry.py @@ -17,7 +17,7 @@ from django.utils.html import escape from .models import Article, ArticleProxy, Site -@override_settings(ROOT_URLCONF="admin_utils.urls") +@override_settings(ROOT_URLCONF='admin_utils.urls') class LogEntryTests(TestCase): def setUp(self): self.user = User.objects.create_superuser(username='super', password='secret', email='super@example.com') diff --git a/tests/admin_widgets/tests.py b/tests/admin_widgets/tests.py index 4d47179c37..3258fdbba1 100644 --- a/tests/admin_widgets/tests.py +++ b/tests/admin_widgets/tests.py @@ -795,8 +795,7 @@ class DateTimePickerSeleniumIETests(DateTimePickerSeleniumFirefoxTests): @skipIf(pytz is None, "this test requires pytz") -@override_settings(TIME_ZONE='Asia/Singapore') -@override_settings(ROOT_URLCONF='admin_widgets.urls') +@override_settings(ROOT_URLCONF='admin_widgets.urls', TIME_ZONE='Asia/Singapore') class DateTimePickerShortcutsSeleniumFirefoxTests(SeleniumDataMixin, AdminSeleniumWebDriverTestCase): available_apps = ['admin_widgets'] + AdminSeleniumWebDriverTestCase.available_apps webdriver_class = 'selenium.webdriver.firefox.webdriver.WebDriver' diff --git a/tests/generic_inline_admin/tests.py b/tests/generic_inline_admin/tests.py index 4bf352ebac..0b35bb506d 100644 --- a/tests/generic_inline_admin/tests.py +++ b/tests/generic_inline_admin/tests.py @@ -380,7 +380,7 @@ class GenericInlineAdminWithUniqueTogetherTest(TestDataMixin, TestCase): self.assertContains(response, 'Are you sure you want to delete') -@override_settings(ROOT_URLCONF="generic_inline_admin.urls") +@override_settings(ROOT_URLCONF='generic_inline_admin.urls') class NoInlineDeletionTest(SimpleTestCase): def test_no_deletion(self): @@ -402,7 +402,7 @@ request = MockRequest() request.user = MockSuperUser() -@override_settings(ROOT_URLCONF="generic_inline_admin.urls") +@override_settings(ROOT_URLCONF='generic_inline_admin.urls') class GenericInlineModelAdminTest(SimpleTestCase): def setUp(self): diff --git a/tests/view_tests/tests/test_csrf.py b/tests/view_tests/tests/test_csrf.py index f595652978..4b21e59034 100644 --- a/tests/view_tests/tests/test_csrf.py +++ b/tests/view_tests/tests/test_csrf.py @@ -6,7 +6,7 @@ from django.utils.translation import override from django.views.csrf import CSRF_FAILURE_TEMPLATE_NAME, csrf_failure -@override_settings(ROOT_URLCONF="view_tests.urls") +@override_settings(ROOT_URLCONF='view_tests.urls') class CsrfViewTests(SimpleTestCase): def setUp(self): diff --git a/tests/view_tests/tests/test_debug.py b/tests/view_tests/tests/test_debug.py index 58d3216e9b..7b9f0b5ffb 100644 --- a/tests/view_tests/tests/test_debug.py +++ b/tests/view_tests/tests/test_debug.py @@ -56,7 +56,7 @@ class CallableSettingWrapperTests(SimpleTestCase): self.assertEqual(actual, "repr from the wrapped callable") -@override_settings(DEBUG=True, ROOT_URLCONF="view_tests.urls") +@override_settings(DEBUG=True, ROOT_URLCONF='view_tests.urls') class DebugViewTests(LoggingCaptureMixin, SimpleTestCase): def test_files(self): @@ -225,7 +225,7 @@ class DebugViewQueriesAllowedTests(SimpleTestCase): @override_settings( DEBUG=True, - ROOT_URLCONF="view_tests.urls", + ROOT_URLCONF='view_tests.urls', # No template directories are configured, so no templates will be found. TEMPLATES=[{ 'BACKEND': 'django.template.backends.dummy.TemplateStrings', diff --git a/tests/wsgi/tests.py b/tests/wsgi/tests.py index ea7112a03d..4056ffda84 100644 --- a/tests/wsgi/tests.py +++ b/tests/wsgi/tests.py @@ -12,7 +12,7 @@ from django.test.client import RequestFactory from django.utils import six -@override_settings(ROOT_URLCONF="wsgi.urls") +@override_settings(ROOT_URLCONF='wsgi.urls') class WSGITest(TestCase): def setUp(self):