diff options
| author | Daniel Wiesmann <yellowcap@users.noreply.github.com> | 2018-07-13 21:48:19 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-07-13 16:48:19 -0400 |
| commit | 8f75d21a2e6d255848ae441d858c6ea819e3d100 (patch) | |
| tree | 9e78cbbcc99557d324332618d27ec4be0227af0e /tests/staticfiles_tests | |
| parent | c28bf990d71a8befb954482e3d6a925e89f3176f (diff) | |
Fixed #28566 -- Added path matching to collectstatic ignore patterns.
Diffstat (limited to 'tests/staticfiles_tests')
| -rw-r--r-- | tests/staticfiles_tests/apps/staticfiles_config.py | 2 | ||||
| -rw-r--r-- | tests/staticfiles_tests/apps/test/static/test/vendor/module.js | 0 | ||||
| -rw-r--r-- | tests/staticfiles_tests/test_management.py | 5 |
3 files changed, 4 insertions, 3 deletions
diff --git a/tests/staticfiles_tests/apps/staticfiles_config.py b/tests/staticfiles_tests/apps/staticfiles_config.py index e48a0c8d99..b8b3960c9d 100644 --- a/tests/staticfiles_tests/apps/staticfiles_config.py +++ b/tests/staticfiles_tests/apps/staticfiles_config.py @@ -2,4 +2,4 @@ from django.contrib.staticfiles.apps import StaticFilesConfig class IgnorePatternsAppConfig(StaticFilesConfig): - ignore_patterns = ['*.css'] + ignore_patterns = ['*.css', '*/vendor/*.js'] diff --git a/tests/staticfiles_tests/apps/test/static/test/vendor/module.js b/tests/staticfiles_tests/apps/test/static/test/vendor/module.js new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/tests/staticfiles_tests/apps/test/static/test/vendor/module.js diff --git a/tests/staticfiles_tests/test_management.py b/tests/staticfiles_tests/test_management.py index 3a6d536013..20595ad118 100644 --- a/tests/staticfiles_tests/test_management.py +++ b/tests/staticfiles_tests/test_management.py @@ -319,11 +319,12 @@ class TestCollectionExcludeNoDefaultIgnore(TestDefaults, CollectionTestCase): 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. + A custom ignore_patterns list, ['*.css', '*/vendor/*.js'] in this case, + can be specified in an AppConfig definition. """ self.assertFileNotFound('test/nonascii.css') self.assertFileContains('test/.hidden', 'should be ignored') + self.assertFileNotFound(os.path.join('test', 'vendor', 'module.js')) class TestCollectionDryRun(TestNoFilesCreated, CollectionTestCase): |
