1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-08 16:53:23 +00:00

Added tetst for uri and port of Request

This commit is contained in:
Max Shytikov
2014-05-03 22:31:30 +02:00
parent 1ff5d08c8b
commit 61e3bdc402

View File

@@ -19,3 +19,19 @@ def test_flat_headers_dict():
headers = {'X-Header1': ['h1', 'h11'], 'X-Header2': ['h2']}
req = Request('GET', 'http://go.com:80/', '', headers)
assert req.flat_headers_dict() == {'X-Header1': 'h1', 'X-Header2': 'h2'}
def test_port():
req = Request('GET', 'http://go.com/', '', {})
assert req.port == 80
req = Request('GET', 'http://go.com:3000/', '', {})
assert req.port == 3000
def test_uri():
req = Request('GET', 'http://go.com/', '', {})
assert req.uri == 'http://go.com/'
req = Request('GET', 'http://go.com:80/', '', {})
assert req.uri == 'http://go.com:80/'