diff options
| author | Paweł Kołodziej <p.kolodziej@gmail.com> | 2018-09-28 01:49:37 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-09-27 19:49:37 -0400 |
| commit | 05c578bc1f6ab09ade17a29f79d7244b7acfb58f (patch) | |
| tree | 45c7b629d13709b0cebb952c7d012984d4abebf0 /tests/staticfiles_tests | |
| parent | 40c8ffad7249fd37ca1629f06d3ab6b129d84b21 (diff) | |
Fixed #29796 -- Added system check for STATICFILES_DIRS prefix ending with a slash.
Diffstat (limited to 'tests/staticfiles_tests')
| -rw-r--r-- | tests/staticfiles_tests/test_checks.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/staticfiles_tests/test_checks.py b/tests/staticfiles_tests/test_checks.py index 0fe432b5c7..d5dc90b781 100644 --- a/tests/staticfiles_tests/test_checks.py +++ b/tests/staticfiles_tests/test_checks.py @@ -75,3 +75,13 @@ class FindersCheckTests(SimpleTestCase): id='staticfiles.E002', ) ]) + + @override_settings(STATICFILES_DIRS=[('prefix/', '/fake/path')]) + def test_prefix_contains_trailing_slash(self): + self.assertEqual(check_finders(None), [ + Error( + "The prefix 'prefix/' in the STATICFILES_DIRS setting must " + "not end with a slash.", + id='staticfiles.E003', + ) + ]) |
