This commit is contained in:
Arnon Yaari
2014-09-11 11:23:38 +03:00
parent 7ef0a02394
commit a13262b352
2 changed files with 24 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
interactions:
- request:
body: null
headers: {}
method: CONNECT
uri: http://vcsavcsa:80
response:
body: {string: !!python/unicode '<HTML><BODY><H1>404 Not Found</H1></BODY></HTML>'}
headers:
connection: [close]
content-length: ['48']
content-type: [text/html]
date: ['Thu, 11 Sep 2014 07:57:56 GMT']
status: {code: 404, message: Not Found}
version: 1

View File

@@ -74,5 +74,14 @@ class ConnectionTests(tests.VCRTestBase):
def test_ssl_tunnel(self):
connect.SoapStubAdapter('sdkTunnel', 8089, httpProxyHost='vcsa').GetConnection()
@vcr.use_cassette('ssl_tunnel_http_failure.yaml',
cassette_library_dir=tests.fixtures_path,
record_mode='none')
def test_ssl_tunnel_http_failure(self):
from six.moves import http_client
def should_fail():
connect.SoapStubAdapter('vcsa', 80, httpProxyHost='vcsa').GetConnection()
self.assertRaises(http_client.HTTPException, should_fail)
if __name__ == '__main__':
unittest.main()