mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-08 16:53:23 +00:00
Format project with black (#467)
Format with line length 110 to match flake8 make black part of linting check Update travis spec for updated black requirements Add diff output for black on failure update changelog
This commit is contained in:
@@ -3,17 +3,17 @@ from six.moves.urllib.request import urlopen
|
||||
|
||||
|
||||
def test_recorded_request_uri_with_redirected_request(tmpdir, httpbin):
|
||||
with vcr.use_cassette(str(tmpdir.join('test.yml'))) as cass:
|
||||
with vcr.use_cassette(str(tmpdir.join("test.yml"))) as cass:
|
||||
assert len(cass) == 0
|
||||
urlopen(httpbin.url + '/redirect/3')
|
||||
assert cass.requests[0].uri == httpbin.url + '/redirect/3'
|
||||
assert cass.requests[3].uri == httpbin.url + '/get'
|
||||
urlopen(httpbin.url + "/redirect/3")
|
||||
assert cass.requests[0].uri == httpbin.url + "/redirect/3"
|
||||
assert cass.requests[3].uri == httpbin.url + "/get"
|
||||
assert len(cass) == 4
|
||||
|
||||
|
||||
def test_records_multiple_header_values(tmpdir, httpbin):
|
||||
with vcr.use_cassette(str(tmpdir.join('test.yml'))) as cass:
|
||||
with vcr.use_cassette(str(tmpdir.join("test.yml"))) as cass:
|
||||
assert len(cass) == 0
|
||||
urlopen(httpbin.url + '/response-headers?foo=bar&foo=baz')
|
||||
urlopen(httpbin.url + "/response-headers?foo=bar&foo=baz")
|
||||
assert len(cass) == 1
|
||||
assert cass.responses[0]['headers']['foo'] == ['bar', 'baz']
|
||||
assert cass.responses[0]["headers"]["foo"] == ["bar", "baz"]
|
||||
|
||||
Reference in New Issue
Block a user