Skip to content

Commit

Permalink
🎨 Clear cache after test touching GlobalConfiguration
Browse files Browse the repository at this point in the history
The cache is shared between tests and when using Redis, even between
parallel test processes. Certain global configuration options can
affect other tests.
  • Loading branch information
sergei-maertens committed Jul 26, 2024
1 parent 07c650b commit 273cf21
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ def setUpTestData(cls):
cls.form = form
cls.fd = fd

def setUp(self):
super().setUp()

self.addCleanup(GlobalConfiguration.clear_cache)

def test_submission_with_email_backend(self):
submission = SubmissionFactory.from_components(
completed=True,
Expand Down

0 comments on commit 273cf21

Please sign in to comment.