Merge pull request #22322 from netbox-community/22319-eventruletestcase-lacks-teardown-leaks-enqueued-events

Closes #22319: Clear RQ queue after Event Rule tests
This commit is contained in:
bctiemann 2026-05-28 20:03:42 -04:00 committed by GitHub
commit 14f5a2ed7c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -33,6 +33,12 @@ class EventRuleTestCase(APITestCase):
self.queue = django_rq.get_queue('default')
self.queue.empty()
def tearDown(self):
super().tearDown()
# Clear the queue so leftover jobs do not leak to the next test suite
self.queue.empty()
@classmethod
def setUpTestData(cls):