summaryrefslogtreecommitdiff
path: root/tests/apps
diff options
context:
space:
mode:
authorHasan <hasan.r67@gmail.com>2016-01-18 12:15:45 +0330
committerTim Graham <timograham@gmail.com>2016-01-29 13:37:33 -0500
commit26ad01719d73823e65c0358a2ee9941e0a888a63 (patch)
tree9e458f4c3428400e0970554ce19f6ed02e862a3b /tests/apps
parent253adc2b8a52982139d40c4f55b3fd446e1cb8f3 (diff)
downloaddjango-26ad01719d73823e65c0358a2ee9941e0a888a63.tar.gz
Refs #26022 -- Replaced six.assertRaisesRegex with assertRaisesMessage as appropriate.
Diffstat (limited to 'tests/apps')
-rw-r--r--tests/apps/tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/apps/tests.py b/tests/apps/tests.py
index af9ba0c6b9..701be50803 100644
--- a/tests/apps/tests.py
+++ b/tests/apps/tests.py
@@ -159,12 +159,12 @@ class AppsTests(SimpleTestCase):
self.assertEqual(apps.get_app_config('relabeled').name, 'apps')
def test_duplicate_labels(self):
- with six.assertRaisesRegex(self, ImproperlyConfigured, "Application labels aren't unique"):
+ with self.assertRaisesMessage(ImproperlyConfigured, "Application labels aren't unique"):
with self.settings(INSTALLED_APPS=['apps.apps.PlainAppsConfig', 'apps']):
pass
def test_duplicate_names(self):
- with six.assertRaisesRegex(self, ImproperlyConfigured, "Application names aren't unique"):
+ with self.assertRaisesMessage(ImproperlyConfigured, "Application names aren't unique"):
with self.settings(INSTALLED_APPS=['apps.apps.RelabeledAppsConfig', 'apps']):
pass
@@ -172,7 +172,7 @@ class AppsTests(SimpleTestCase):
"""
App discovery should preserve stack traces. Regression test for #22920.
"""
- with six.assertRaisesRegex(self, ImportError, "Oops"):
+ with self.assertRaisesMessage(ImportError, "Oops"):
with self.settings(INSTALLED_APPS=['import_error_package']):
pass