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.

Backport-of: 2e7a611
  • Loading branch information
sergei-maertens committed Jul 31, 2024
1 parent ea8aca0 commit 33f8adf
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,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 33f8adf

Please sign in to comment.