diff --git a/django/contrib/messages/tests/test_base.py b/django/contrib/messages/tests/base.py similarity index 99% rename from django/contrib/messages/tests/test_base.py rename to django/contrib/messages/tests/base.py index b3ced12773..0d689729aa 100644 --- a/django/contrib/messages/tests/test_base.py +++ b/django/contrib/messages/tests/base.py @@ -5,7 +5,6 @@ from django.contrib.messages.api import MessageFailure from django.contrib.messages.storage import default_storage, base from django.contrib.messages.storage.base import Message from django.core.urlresolvers import reverse -from django.test import TestCase from django.test.utils import override_settings from django.utils.translation import ugettext_lazy from django.utils.unittest import skipIf @@ -43,7 +42,7 @@ class override_settings_tags(override_settings): base.LEVEL_TAGS = self.old_level_tags -class BaseTest(TestCase): +class BaseTests(object): storage_class = default_storage urls = 'django.contrib.messages.tests.urls' levels = { diff --git a/django/contrib/messages/tests/test_cookie.py b/django/contrib/messages/tests/test_cookie.py index 630edfe3b0..5871ecc773 100644 --- a/django/contrib/messages/tests/test_cookie.py +++ b/django/contrib/messages/tests/test_cookie.py @@ -1,10 +1,11 @@ import json from django.contrib.messages import constants -from django.contrib.messages.tests.test_base import BaseTest +from django.contrib.messages.tests.base import BaseTests from django.contrib.messages.storage.cookie import (CookieStorage, MessageEncoder, MessageDecoder) from django.contrib.messages.storage.base import Message +from django.test import TestCase from django.test.utils import override_settings from django.utils.safestring import SafeData, mark_safe @@ -41,7 +42,7 @@ def stored_cookie_messages_count(storage, response): @override_settings(SESSION_COOKIE_DOMAIN='.example.com') -class CookieTest(BaseTest): +class CookieTest(BaseTests, TestCase): storage_class = CookieStorage def stored_messages_count(self, storage, response): diff --git a/django/contrib/messages/tests/test_fallback.py b/django/contrib/messages/tests/test_fallback.py index 9a1d772fb7..cd0b1888f3 100644 --- a/django/contrib/messages/tests/test_fallback.py +++ b/django/contrib/messages/tests/test_fallback.py @@ -1,14 +1,15 @@ from django.contrib.messages import constants from django.contrib.messages.storage.fallback import (FallbackStorage, CookieStorage) -from django.contrib.messages.tests.test_base import BaseTest +from django.contrib.messages.tests.base import BaseTests from django.contrib.messages.tests.test_cookie import (set_cookie_data, stored_cookie_messages_count) from django.contrib.messages.tests.test_session import (set_session_data, stored_session_messages_count) +from django.test import TestCase -class FallbackTest(BaseTest): +class FallbackTest(BaseTests, TestCase): storage_class = FallbackStorage def get_request(self): diff --git a/django/contrib/messages/tests/test_session.py b/django/contrib/messages/tests/test_session.py index 2aa84d04ca..2ce564b773 100644 --- a/django/contrib/messages/tests/test_session.py +++ b/django/contrib/messages/tests/test_session.py @@ -1,8 +1,9 @@ from django.contrib.messages import constants -from django.contrib.messages.tests.test_base import BaseTest +from django.contrib.messages.tests.base import BaseTests from django.contrib.messages.storage.base import Message from django.contrib.messages.storage.session import SessionStorage from django.utils.safestring import SafeData, mark_safe +from django.test import TestCase def set_session_data(storage, messages): @@ -20,7 +21,7 @@ def stored_session_messages_count(storage): return len(data) -class SessionTest(BaseTest): +class SessionTest(BaseTests, TestCase): storage_class = SessionStorage def get_request(self):