def tearDown(self) -> None: super().tearDown() # Important: we need to clear event queues to avoid leaking data to future tests. clear_client_event_queues_for_testing() clear_supported_auth_backends_cache() flush_per_request_caches() translation.activate(settings.LANGUAGE_CODE)
def tearDown(self) -> None: super().tearDown() # Important: we need to clear event queues to avoid leaking data to future tests. clear_client_event_queues_for_testing() clear_supported_auth_backends_cache() flush_per_request_caches() translation.activate(settings.LANGUAGE_CODE) # Clean up after using fakeldap in ldap tests: if hasattr(self, 'mock_ldap') and hasattr(self, 'mock_initialize'): if self.mock_ldap is not None: self.mock_ldap.reset() self.mock_initialize.stop()
def tearDown(self) -> None: super().tearDown() # Important: we need to clear event queues to avoid leaking data to future tests. clear_client_event_queues_for_testing() clear_supported_auth_backends_cache()