aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_pathod.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/test_pathod.py b/test/test_pathod.py
index 1484efcd..86f37f01 100644
--- a/test/test_pathod.py
+++ b/test/test_pathod.py
@@ -1,6 +1,6 @@
import requests
from libpathod import pathod, test, version, pathoc
-from netlib import tcp
+from netlib import tcp, http
import tutils
class _TestApplication:
@@ -115,6 +115,12 @@ class _DaemonTests:
assert l["type"] == "error"
assert "foo" in l["msg"]
+ def test_invalid_body(self):
+ tutils.raises(http.HttpError, self.pathoc, "get:/:h'content-length'='foo'")
+ l = self.d.log()[0]
+ assert l["type"] == "error"
+ assert "Invalid" in l["msg"]
+
class TestDaemon(_DaemonTests):