diff options
| author | Mads Jensen <mje@inducks.org> | 2017-05-28 21:37:21 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-07-29 19:07:23 -0400 |
| commit | a51c4de1945be2225f20fad794cfb52d8f1f9236 (patch) | |
| tree | 36386b70a27cf027a8a491de319c3e59e0d3d0cd /tests/staticfiles_tests/test_finders.py | |
| parent | 38988f289f7f5708f5ea85de2d5dfe0d86b23106 (diff) | |
Used assertRaisesMessage() to test Django's error messages.
Diffstat (limited to 'tests/staticfiles_tests/test_finders.py')
| -rw-r--r-- | tests/staticfiles_tests/test_finders.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/staticfiles_tests/test_finders.py b/tests/staticfiles_tests/test_finders.py index 20d3060092..9d5707cc2d 100644 --- a/tests/staticfiles_tests/test_finders.py +++ b/tests/staticfiles_tests/test_finders.py @@ -105,5 +105,10 @@ class TestMiscFinder(SimpleTestCase): @override_settings(MEDIA_ROOT='') def test_location_empty(self): - with self.assertRaises(ImproperlyConfigured): + msg = ( + "The storage backend of the staticfiles finder " + "<class 'django.contrib.staticfiles.finders.DefaultStorageFinder'> " + "doesn't have a valid location." + ) + with self.assertRaisesMessage(ImproperlyConfigured, msg): finders.DefaultStorageFinder() |
