fix request-target tests

This commit is contained in:
Thomas Kriechbaumer 2015-08-18 21:22:27 +02:00
parent c903efcf5b
commit 12efa61e3a
1 changed files with 4 additions and 11 deletions

View File

@ -69,17 +69,10 @@ class TestRequest(object):
def test_legacy_first_line(self): def test_legacy_first_line(self):
req = tutils.treq() req = tutils.treq()
req.form_in = 'relative' assert req.legacy_first_line('relative') == "GET /path HTTP/1.1"
assert req.legacy_first_line() == "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"
req.form_in = 'authority' tutils.raises(http.HttpError, req.legacy_first_line, 'foobar')
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)
def test_anticache(self): def test_anticache(self):
req = tutils.treq() req = tutils.treq()