From f8f03ea99d0ccd96e8e7e1b02bcf54043a6fc31d Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 2 Aug 2015 20:14:39 +0200 Subject: [PATCH] Small simplification in test_http_hypothesis. --- tests/browser/http/test_http_hypothesis.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/browser/http/test_http_hypothesis.py b/tests/browser/http/test_http_hypothesis.py index e296b2ff2..bc0377afa 100644 --- a/tests/browser/http/test_http_hypothesis.py +++ b/tests/browser/http/test_http_hypothesis.py @@ -26,13 +26,8 @@ from hypothesis import strategies from qutebrowser.browser import http, rfc6266 -@hypothesis.given(strategies.text(alphabet=[chr(x) for x in range(255)])) -def test_parse_content_disposition(stubs, s): - reply = stubs.FakeNetworkReply(headers={'Content-Disposition': s}) - http.parse_content_disposition(reply) - - @pytest.mark.parametrize('template', [ + '{}', 'attachment; filename="{}"', 'inline; {}', 'attachment; {}="foo"', @@ -40,7 +35,7 @@ def test_parse_content_disposition(stubs, s): 'attachment; filename*={}', ]) @hypothesis.given(strategies.text(alphabet=[chr(x) for x in range(255)])) -def test_parse_content_disposition_template(template, stubs, s): +def test_parse_content_disposition(template, stubs, s): header = template.format(s) reply = stubs.FakeNetworkReply(headers={'Content-Disposition': header}) http.parse_content_disposition(reply)