Exemple #1
0
    def test_shutdown_integration_managers(self):
        """Testing shutdown_integration_managers"""
        IntegrationManager(IntegrationConfig)
        IntegrationManager(IntegrationConfig)

        shutdown_integration_managers()

        self.assertEqual(get_integration_managers(), [])
Exemple #2
0
    def test_shutdown_integration_managers(self):
        """Testing shutdown_integration_managers"""
        IntegrationManager(IntegrationConfig)
        IntegrationManager(IntegrationConfig)

        shutdown_integration_managers()

        self.assertEqual(get_integration_managers(), [])
Exemple #3
0
    def process_request(self, request):
        """Process an HTTP request.

        This will run through all the integration managers, checking if any
        have expired and ensuring they have the latest state.
        """
        if self.check_expiration:
            for integration_manager in get_integration_managers():
                integration_manager.check_expired()
Exemple #4
0
    def test_shutdown_integration_managers(self):
        """Testing shutdown_integration_managers"""
        manager1 = IntegrationManager(IntegrationConfig)
        self.assertTrue(manager1.enabled)

        manager2 = IntegrationManager(IntegrationConfig)
        self.assertTrue(manager2.enabled)

        shutdown_integration_managers()

        self.assertEqual(get_integration_managers(), [])
        self.assertFalse(manager1.enabled)
        self.assertFalse(manager2.enabled)
Exemple #5
0
    def test_shutdown_integration_managers(self):
        """Testing shutdown_integration_managers"""
        manager1 = IntegrationManager(IntegrationConfig)
        self.assertTrue(manager1.enabled)

        manager2 = IntegrationManager(IntegrationConfig)
        self.assertTrue(manager2.enabled)

        shutdown_integration_managers()

        self.assertEqual(get_integration_managers(), [])
        self.assertFalse(manager1.enabled)
        self.assertFalse(manager2.enabled)
Exemple #6
0
    def test_get_integration_managers(self):
        """Testing get_integration_managers"""
        manager1 = IntegrationManager(IntegrationConfig)
        manager2 = IntegrationManager(IntegrationConfig)

        self.assertEqual(set(get_integration_managers()), {manager1, manager2})
Exemple #7
0
    def test_get_integration_managers(self):
        """Testing get_integration_managers"""
        manager1 = IntegrationManager(IntegrationConfig)
        manager2 = IntegrationManager(IntegrationConfig)

        self.assertEqual(set(get_integration_managers()), {manager1, manager2})