From 12efa61e3af1b0ede4a803320b6f2a14b034aa5d Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Tue, 18 Aug 2015 21:22:27 +0200 Subject: [PATCH] fix request-target tests --- test/http/test_semantics.py | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/test/http/test_semantics.py b/test/http/test_semantics.py index 7ef69dcff..2a799044f 100644 --- a/test/http/test_semantics.py +++ b/test/http/test_semantics.py @@ -69,17 +69,10 @@ class TestRequest(object): def test_legacy_first_line(self): req = tutils.treq() - req.form_in = 'relative' - assert req.legacy_first_line() == "GET /path HTTP/1.1" - - req.form_in = 'authority' - assert req.legacy_first_line() == "GET address:22 HTTP/1.1" - - req.form_in = 'absolute' - assert req.legacy_first_line() == "GET http://address:22/path HTTP/1.1" - - req.form_in = 'foobar' - tutils.raises(http.HttpError, req.legacy_first_line) + assert req.legacy_first_line('relative') == "GET /path HTTP/1.1" + assert req.legacy_first_line('authority') == "GET address:22 HTTP/1.1" + assert req.legacy_first_line('absolute') == "GET http://address:22/path HTTP/1.1" + tutils.raises(http.HttpError, req.legacy_first_line, 'foobar') def test_anticache(self): req = tutils.treq()