From e8a9a65befd4c99634da369628da5104ff27b36d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steinn=20Eldj=C3=A1rn=20Sigur=C3=B0arson?= Date: Fri, 28 Jun 2019 13:35:05 +0000 Subject: [PATCH] Make test use stream output to test MockStream interface --- tests/integration/test_aiohttp.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/integration/test_aiohttp.py b/tests/integration/test_aiohttp.py index 58b9a62..a02c982 100644 --- a/tests/integration/test_aiohttp.py +++ b/tests/integration/test_aiohttp.py @@ -95,13 +95,12 @@ def test_binary(tmpdir, scheme): def test_stream(tmpdir, scheme): url = scheme + '://httpbin.org/get' - headers = {'Content-Type': 'application/json'} with vcr.use_cassette(str(tmpdir.join('stream.yaml'))): - resp, body = get(url, output='raw') # XXX: headers? + resp, body = get(url, output='raw') # Do not use stream here, as the stream is exhausted by vcr with vcr.use_cassette(str(tmpdir.join('stream.yaml'))) as cassette: - cassette_resp, cassette_body = get(url, output='raw') + cassette_resp, cassette_body = get(url, output='stream') assert cassette_body == body assert cassette.play_count == 1