Ejemplo n.º 1
0
    def test_getrequest_nondefault_port(self):
        x = AsyncHTTPConnection('aws.vandelay.com', port=8080)
        x.Request = Mock(name='Request')
        x.getrequest()
        self.assertRequestCreatedWith('http://aws.vandelay.com:8080/', x)

        y = AsyncHTTPSConnection('aws.vandelay.com', port=8443)
        y.Request = Mock(name='Request')
        y.getrequest()
        self.assertRequestCreatedWith('https://aws.vandelay.com:8443/', y)
Ejemplo n.º 2
0
    def test_getrequest_nondefault_port(self):
        x = AsyncHTTPConnection('aws.vandelay.com', port=8080)
        x.Request = Mock(name='Request')
        x.getrequest()
        self.assertRequestCreatedWith('http://aws.vandelay.com:8080/', x)

        y = AsyncHTTPSConnection('aws.vandelay.com', port=8443)
        y.Request = Mock(name='Request')
        y.getrequest()
        self.assertRequestCreatedWith('https://aws.vandelay.com:8443/', y)
Ejemplo n.º 3
0
 def test_AsyncHTTPSConnection(self):
     x = AsyncHTTPSConnection('aws.vandelay.com')
     self.assertEqual(x.scheme, 'https')
Ejemplo n.º 4
0
 def test_getrequest_AsyncHTTPSConnection(self):
     x = AsyncHTTPSConnection('aws.vandelay.com')
     x.Request = Mock(name='Request')
     x.getrequest()
     self.assertRequestCreatedWith('https://aws.vandelay.com/', x)
Ejemplo n.º 5
0
 def test_getrequest_AsyncHTTPSConnection(self):
     x = AsyncHTTPSConnection('aws.vandelay.com')
     x.Request = Mock(name='Request')
     x.getrequest()
     self.assertRequestCreatedWith('https://aws.vandelay.com/', x)
Ejemplo n.º 6
0
 def test_AsyncHTTPSConnection(self):
     x = AsyncHTTPSConnection('aws.vandelay.com')
     assert x.scheme == 'https'