9d95d4332c15 — Oben Sonne 10 years ago
server: new server only tests
1 files changed, 26 insertions(+), 0 deletions(-)

A => server/src/tests/test_serveronly.py
A => server/src/tests/test_serveronly.py +26 -0
@@ 0,0 1,26 @@ 
+"""
+Test server only.
+
+"""
+
+import time
+
+from . import Server
+
+def test_serverstart():
+    """Server: plain start and stop"""
+
+    s = Server()
+    time.sleep(1)
+    s.stop()
+
+def test_serverstart_hostname():
+    """Server: hostnames"""
+
+    s = Server(wifi_host='localhost', wifi_port=60321)
+    time.sleep(1)
+    s.stop()
+
+    s = Server(wifi_host='aslfsadjfweias')
+    time.sleep(1)
+    s.stop(expecterrors=True)