aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2015-08-18 21:22:27 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2015-08-18 21:22:27 +0200
commit12efa61e3af1b0ede4a803320b6f2a14b034aa5d (patch)
tree6a0438d2fcecb496108e452dc2b1b7c4a126ffbf
parentc903efcf5b34fa775d3e64623e54bd8e75b740cb (diff)
downloadmitmproxy-12efa61e3af1b0ede4a803320b6f2a14b034aa5d.tar.gz
mitmproxy-12efa61e3af1b0ede4a803320b6f2a14b034aa5d.tar.bz2
mitmproxy-12efa61e3af1b0ede4a803320b6f2a14b034aa5d.zip
fix request-target tests
-rw-r--r--test/http/test_semantics.py15
1 files changed, 4 insertions, 11 deletions
diff --git a/test/http/test_semantics.py b/test/http/test_semantics.py
index 7ef69dcf..2a799044 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()