Exemplo n.º 1
0
 def test_client(self):
     sqs = Mock(name='sqs')
     x = AsyncConnection(sqs)
     assert x._httpclient is http.get_client()
     client = Mock(name='client')
     y = AsyncConnection(sqs, http_client=client)
     assert y._httpclient is client
Exemplo n.º 2
0
 def test_get_client(self):
     client = http.get_client()
     self.assertIs(client.hub, self.hub)
     client2 = http.get_client(self.hub)
     self.assertIs(client2, client)
     self.assertIs(client2.hub, self.hub)
Exemplo n.º 3
0
 def test_get_client(self):
     client = http.get_client()
     self.assertIs(client.hub, self.hub)
     client2 = http.get_client(self.hub)
     self.assertIs(client2, client)
     self.assertIs(client2.hub, self.hub)
Exemplo n.º 4
0
 def test_http_client(self):
     x = AsyncHTTPConnection('aws.vandelay.com')
     self.assertIs(x.http_client, http.get_client())
     client = Mock(name='http_client')
     y = AsyncHTTPConnection('aws.vandelay.com', http_client=client)
     self.assertIs(y.http_client, client)
Exemplo n.º 5
0
 def test_client(self):
     x = AsyncConnection()
     self.assertIs(x._httpclient, http.get_client())
     client = Mock(name='client')
     y = AsyncConnection(http_client=client)
     self.assertIs(y._httpclient, client)
Exemplo n.º 6
0
 def test_get_client(self, hub):
     client = http.get_client()
     assert client.hub is hub
     client2 = http.get_client(hub)
     assert client2 is client
     assert client2.hub is hub
Exemplo n.º 7
0
 def test_http_client(self):
     x = AsyncHTTPConnection('aws.vandelay.com')
     self.assertIs(x.http_client, http.get_client())
     client = Mock(name='http_client')
     y = AsyncHTTPConnection('aws.vandelay.com', http_client=client)
     self.assertIs(y.http_client, client)
Exemplo n.º 8
0
 def test_client(self):
     x = AsyncConnection()
     self.assertIs(x._httpclient, http.get_client())
     client = Mock(name='client')
     y = AsyncConnection(http_client=client)
     self.assertIs(y._httpclient, client)
Exemplo n.º 9
0
 def test_http_client(self):
     x = AsyncHTTPConnection('aws.vandelay.com')
     assert x.http_client is http.get_client()
     client = Mock(name='http_client')
     y = AsyncHTTPConnection('aws.vandelay.com', http_client=client)
     assert y.http_client is client
Exemplo n.º 10
0
 def test_client(self):
     x = AsyncConnection()
     assert x._httpclient is http.get_client()
     client = Mock(name='client')
     y = AsyncConnection(http_client=client)
     assert y._httpclient is client