diff options
Diffstat (limited to 'tests/redirects_tests')
-rw-r--r-- | tests/redirects_tests/tests.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/redirects_tests/tests.py b/tests/redirects_tests/tests.py index 5bce11d800..e7f5dfb97d 100644 --- a/tests/redirects_tests/tests.py +++ b/tests/redirects_tests/tests.py @@ -57,7 +57,11 @@ class RedirectTests(TestCase): @modify_settings(INSTALLED_APPS={'remove': 'django.contrib.sites'}) def test_sites_not_installed(self): - with self.assertRaises(ImproperlyConfigured): + msg = ( + 'You cannot use RedirectFallbackMiddleware when ' + 'django.contrib.sites is not installed.' + ) + with self.assertRaisesMessage(ImproperlyConfigured, msg): RedirectFallbackMiddleware() |