diff options
Diffstat (limited to 'tests/staticfiles_tests/tests.py')
| -rw-r--r-- | tests/staticfiles_tests/tests.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/staticfiles_tests/tests.py b/tests/staticfiles_tests/tests.py index 912dcffe83..a2e50a1404 100644 --- a/tests/staticfiles_tests/tests.py +++ b/tests/staticfiles_tests/tests.py @@ -223,6 +223,17 @@ class TestFindStatic(CollectionTestCase, TestDefaults): self.assertIn('apps', force_text(lines[1])) +class TestConfiguration(StaticFilesTestCase): + def test_location_empty(self): + 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'): + call_command('collectstatic', interactive=False, verbosity=0, stderr=err) + + class TestCollection(CollectionTestCase, TestDefaults): """ Test ``collectstatic`` management command. |
