diff options
Diffstat (limited to 'tests/staticfiles_tests/test_management.py')
| -rw-r--r-- | tests/staticfiles_tests/test_management.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/staticfiles_tests/test_management.py b/tests/staticfiles_tests/test_management.py index f0c6384df7..d2ae7e2ed5 100644 --- a/tests/staticfiles_tests/test_management.py +++ b/tests/staticfiles_tests/test_management.py @@ -195,6 +195,20 @@ class TestCollectionExcludeNoDefaultIgnore(TestDefaults, CollectionTestCase): self.assertFileContains('test/CVS', 'should be ignored') +@override_settings(INSTALLED_APPS=[ + 'staticfiles_tests.apps.staticfiles_config.IgnorePatternsAppConfig', + 'staticfiles_tests.apps.test', +]) +class TestCollectionCustomIgnorePatterns(CollectionTestCase): + def test_custom_ignore_patterns(self): + """ + A custom ignore_patterns list, ['*.css'] in this case, can be specified + in an AppConfig definition. + """ + self.assertFileNotFound('test/nonascii.css') + self.assertFileContains('test/.hidden', 'should be ignored') + + class TestCollectionDryRun(TestNoFilesCreated, CollectionTestCase): """ Test ``--dry-run`` option for ``collectstatic`` management command. |
