diff options
Diffstat (limited to 'tests/staticfiles_tests/cases.py')
| -rw-r--r-- | tests/staticfiles_tests/cases.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/staticfiles_tests/cases.py b/tests/staticfiles_tests/cases.py index 918ec4f99e..d4a48ce714 100644 --- a/tests/staticfiles_tests/cases.py +++ b/tests/staticfiles_tests/cases.py @@ -61,6 +61,8 @@ class CollectionTestCase(BaseStaticFilesMixin, SimpleTestCase): is separated because some test cases need those asserts without all these tests. """ + run_collectstatic_in_setUp = True + def setUp(self): super().setUp() temp_dir = tempfile.mkdtemp() @@ -68,7 +70,8 @@ class CollectionTestCase(BaseStaticFilesMixin, SimpleTestCase): # rather than as a context manager self.patched_settings = self.settings(STATIC_ROOT=temp_dir) self.patched_settings.enable() - self.run_collectstatic() + if self.run_collectstatic_in_setUp: + self.run_collectstatic() # Same comment as in runtests.teardown. self.addCleanup(shutil.rmtree, temp_dir) |
