summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArthur Silva <arthursilva.ee@gmail.com>2018-06-09 18:12:43 -0400
committerTim Graham <timograham@gmail.com>2018-06-11 20:49:27 -0400
commit91a02dce97ec677933527deddcce230e6e7ba7c9 (patch)
tree88bfc655e63d966273ad27a8a7925d9ebbff7433 /tests
parent020c51d5016379fe80e2029db200c6b7e05d62c1 (diff)
[2.1.x] Fixed #29464 -- Silenced post-process messages in collectstatic's default verbosity.
Backport of bc1435551c0cfaf4a22aff8216990b909005dba9 from master
Diffstat (limited to 'tests')
-rw-r--r--tests/staticfiles_tests/test_management.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/staticfiles_tests/test_management.py b/tests/staticfiles_tests/test_management.py
index 74c7ef9fc6..3a6d536013 100644
--- a/tests/staticfiles_tests/test_management.py
+++ b/tests/staticfiles_tests/test_management.py
@@ -179,6 +179,7 @@ class TestCollection(TestDefaults, CollectionTestCase):
class TestCollectionVerbosity(CollectionTestCase):
copying_msg = 'Copying '
run_collectstatic_in_setUp = False
+ post_process_msg = 'Post-processed'
staticfiles_copied_msg = 'static files copied to'
def test_verbosity_0(self):
@@ -200,6 +201,18 @@ class TestCollectionVerbosity(CollectionTestCase):
self.assertIn(self.staticfiles_copied_msg, output)
self.assertIn(self.copying_msg, output)
+ @override_settings(STATICFILES_STORAGE='django.contrib.staticfiles.storage.CachedStaticFilesStorage')
+ def test_verbosity_1_with_post_process(self):
+ stdout = StringIO()
+ self.run_collectstatic(verbosity=1, stdout=stdout, post_process=True)
+ self.assertNotIn(self.post_process_msg, stdout.getvalue())
+
+ @override_settings(STATICFILES_STORAGE='django.contrib.staticfiles.storage.CachedStaticFilesStorage')
+ def test_verbosity_2_with_post_process(self):
+ stdout = StringIO()
+ self.run_collectstatic(verbosity=2, stdout=stdout, post_process=True)
+ self.assertIn(self.post_process_msg, stdout.getvalue())
+
class TestCollectionClear(CollectionTestCase):
"""