def test_request_with_body_buffer(self): x = AsyncHTTPSConnection('aws.vandelay.com') body = Mock(name='body') body.read.return_value = 'Vandelay Industries' x.request('PUT', '/importer-exporter', body) assert x.method == 'PUT' assert x.path == '/importer-exporter' assert x.body == 'Vandelay Industries' body.read.assert_called_with()
def test_request_with_body_buffer(self): x = AsyncHTTPSConnection('aws.vandelay.com') body = Mock(name='body') body.read.return_value = 'Vandelay Industries' x.request('PUT', '/importer-exporter', body) assert x.method == 'PUT' assert x.path == '/importer-exporter' assert x.body == 'Vandelay Industries' body.read.assert_called_with()
def test_request_with_headers(self): x = AsyncHTTPSConnection() headers = {'Proxy': 'proxy.vandelay.com'} x.request('PUT', '/importer-exporter', None, headers) assert 'Proxy' in dict(x.headers) assert dict(x.headers)['Proxy'] == 'proxy.vandelay.com'
def test_request_with_body_text(self): x = AsyncHTTPSConnection('aws.vandelay.com') x.request('PUT', '/importer-exporter', 'Vandelay Industries') assert x.method == 'PUT' assert x.path == '/importer-exporter' assert x.body == 'Vandelay Industries'
def test_request(self): x = AsyncHTTPSConnection('aws.vandelay.com') x.request('PUT', '/importer-exporter') assert x.path == '/importer-exporter' assert x.method == 'PUT'
def test_request_with_headers(self): x = AsyncHTTPSConnection() headers = {'Proxy': 'proxy.vandelay.com'} x.request('PUT', '/importer-exporter', None, headers) assert 'Proxy' in dict(x.headers) assert dict(x.headers)['Proxy'] == 'proxy.vandelay.com'
def test_request_with_body_text(self): x = AsyncHTTPSConnection('aws.vandelay.com') x.request('PUT', '/importer-exporter', 'Vandelay Industries') assert x.method == 'PUT' assert x.path == '/importer-exporter' assert x.body == 'Vandelay Industries'
def test_request(self): x = AsyncHTTPSConnection('aws.vandelay.com') x.request('PUT', '/importer-exporter') assert x.path == '/importer-exporter' assert x.method == 'PUT'