mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 16:17:49 +00:00
Fix unit tests
This commit is contained in:
parent
1a9ba295ce
commit
27c7e9e934
@ -153,7 +153,7 @@ class CommonTests(tutils.DaemonTests):
|
|||||||
assert l["type"] == "error"
|
assert l["type"] == "error"
|
||||||
assert "foo" in l["msg"]
|
assert "foo" in l["msg"]
|
||||||
|
|
||||||
def test_invalid_body(self):
|
def test_invalid_content_length(self):
|
||||||
tutils.raises(
|
tutils.raises(
|
||||||
http.HttpError,
|
http.HttpError,
|
||||||
self.pathoc,
|
self.pathoc,
|
||||||
@ -161,7 +161,7 @@ class CommonTests(tutils.DaemonTests):
|
|||||||
)
|
)
|
||||||
l = self.d.last_log()
|
l = self.d.last_log()
|
||||||
assert l["type"] == "error"
|
assert l["type"] == "error"
|
||||||
assert "Invalid" in l["msg"]
|
assert "Content-Length unknown" in l["msg"]
|
||||||
|
|
||||||
def test_invalid_headers(self):
|
def test_invalid_headers(self):
|
||||||
tutils.raises(http.HttpError, self.pathoc, "get:/:h'\t'='foo'")
|
tutils.raises(http.HttpError, self.pathoc, "get:/:h'\t'='foo'")
|
||||||
|
Loading…
Reference in New Issue
Block a user