Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
    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()
Exemplo n.º 3
0
 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()