mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Refs #26022 -- Replaced six.assertRaisesRegex with assertRaisesMessage as appropriate.
This commit is contained in:
parent
253adc2b8a
commit
26ad01719d
23 changed files with 124 additions and 221 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue