diff options
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): |
