aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_pathod.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_pathod.py')
-rw-r--r--test/test_pathod.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/test_pathod.py b/test/test_pathod.py
index 9f01b25c..a23b7c71 100644
--- a/test/test_pathod.py
+++ b/test/test_pathod.py
@@ -1,5 +1,5 @@
import requests
-from libpathod import pathod, test, version
+from libpathod import pathod, test, version, pathoc
from netlib import tcp
import tutils
@@ -64,6 +64,17 @@ class _DaemonTests:
scheme = "https" if self.SSL else "http"
return requests.get("%s://localhost:%s/p/%s"%(scheme, self.d.port, spec), verify=False)
+ def pathoc(self, spec):
+ c = pathoc.Pathoc("localhost", self.d.port)
+ c.connect()
+ if self.SSL:
+ c.convert_to_ssl()
+ return c.request(spec)
+
+ def test_preline(self):
+ v = self.pathoc(r"get:'/p/200':i0,'\r\n'")
+ assert v[1] == 200
+
def test_info(self):
assert tuple(self.d.info()["version"]) == version.IVERSION