diff options
| author | Hasan <hasan.r67@gmail.com> | 2016-01-18 12:15:45 +0330 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-01-29 13:37:33 -0500 |
| commit | 26ad01719d73823e65c0358a2ee9941e0a888a63 (patch) | |
| tree | 9e458f4c3428400e0970554ce19f6ed02e862a3b /tests/staticfiles_tests/test_management.py | |
| parent | 253adc2b8a52982139d40c4f55b3fd446e1cb8f3 (diff) | |
Refs #26022 -- Replaced six.assertRaisesRegex with assertRaisesMessage as appropriate.
Diffstat (limited to 'tests/staticfiles_tests/test_management.py')
| -rw-r--r-- | tests/staticfiles_tests/test_management.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/staticfiles_tests/test_management.py b/tests/staticfiles_tests/test_management.py index 7c1c4223d0..ed6749b217 100644 --- a/tests/staticfiles_tests/test_management.py +++ b/tests/staticfiles_tests/test_management.py @@ -98,12 +98,11 @@ class TestFindStatic(CollectionTestCase, TestDefaults): class TestConfiguration(StaticFilesTestCase): def test_location_empty(self): + msg = 'without having set the STATIC_ROOT setting to a filesystem path' err = six.StringIO() for root in ['', None]: with override_settings(STATIC_ROOT=root): - with six.assertRaisesRegex( - self, ImproperlyConfigured, - 'without having set the STATIC_ROOT setting to a filesystem path'): + with self.assertRaisesMessage(ImproperlyConfigured, msg): call_command('collectstatic', interactive=False, verbosity=0, stderr=err) def test_local_storage_detection_helper(self): |
