From: Max Shytikov Date: Wed, 30 Apr 2014 02:05:27 +0000 (+0200) Subject: Updated test to use new headers structure X-Git-Tag: v1.0.0~36^2~10 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=3d2da2693322efcf27ea53fb3ec89fcefd4366f4;p=vcrpy.git Updated test to use new headers structure --- diff --git a/tests/integration/test_filter.py b/tests/integration/test_filter.py index d1bad9c..11dea94 100644 --- a/tests/integration/test_filter.py +++ b/tests/integration/test_filter.py @@ -16,7 +16,7 @@ def _request_with_auth(url, username, password): def _find_header(cassette, header): for request in cassette.requests: - for k, v in request.headers: + for k in request.headers: if header.lower() == k.lower(): return True return False @@ -25,7 +25,7 @@ def _find_header(cassette, header): def test_filter_basic_auth(tmpdir): url = 'http://httpbin.org/basic-auth/user/passwd' cass_file = str(tmpdir.join('basic_auth_filter.yaml')) - my_vcr = vcr.VCR(match_on = ['url', 'method', 'headers']) + my_vcr = vcr.VCR(match_on=['uri', 'method', 'headers']) # 2 requests, one with auth failure and one with auth success with my_vcr.use_cassette(cass_file, filter_headers=['authorization']): with pytest.raises(HTTPError):