aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_pathod.py8
-rw-r--r--test/test_test.py21
2 files changed, 29 insertions, 0 deletions
diff --git a/test/test_pathod.py b/test/test_pathod.py
index bb78e094..af02239e 100644
--- a/test/test_pathod.py
+++ b/test/test_pathod.py
@@ -57,7 +57,15 @@ class uPages(libpry.AutoTree):
assert "".join(page._write_buffer)
+class u_make_server(libpry.AutoTree):
+ def test_simple(self):
+ app = pathod.PathodApp()
+ assert pathod.make_server(app, 0, "127.0.0.1", None)
+
+
tests = [
uApplication(),
+ #uPages(),
+ u_make_server()
]
diff --git a/test/test_test.py b/test/test_test.py
new file mode 100644
index 00000000..6e80dd77
--- /dev/null
+++ b/test/test_test.py
@@ -0,0 +1,21 @@
+import time
+import libpry
+import requests
+from libpathod import test
+
+
+class uDaemon(libpry.AutoTree):
+ def test_startstop(self):
+ d = test.Daemon()
+ rsp = requests.get("http://localhost:%s/p/202"%d.port)
+ assert rsp.ok
+ assert rsp.status_code == 202
+ d.shutdown()
+ rsp = requests.get("http://localhost:%s/p/202"%d.port)
+ assert not rsp.ok
+
+
+
+tests = [
+ uDaemon()
+]