Exemplo n.º 1
0
 def test_create_config_client_with_singleton(self, monkeypatch):
     monkeypatch.setattr(requests, "get", conftest.response_mock_success)
     client1 = create_config_client(app_name="app1")
     client2 = create_config_client(app_name="app2")
     assert id(client1) == id(client2)
Exemplo n.º 2
0
    def test_create_config_client_with_singleton(self, RequestMock):
        client1 = create_config_client(app_name='simpleweb000')
        client2 = create_config_client(app_name='simpleweb999')

        self.assertEqual(client1, client2)
Exemplo n.º 3
0
    def test_create_config_client_with_singleton(self, RequestMock):
        client1 = create_config_client()
        client2 = create_config_client()

        self.assertEqual(client1, client2)