aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_websocket.py
diff options
context:
space:
mode:
authorGravatar Christopher Baklid <[email protected]>2018-05-20 21:11:18 +0200
committerGravatar GitHub <[email protected]>2018-05-20 21:11:18 +0200
commit687fedfffa402e049c59668f2a6248ad2ba17910 (patch)
tree834e909781213650b40508398ed5a9bef10686c5 /tests/test_websocket.py
parentremove set -e (diff)
Tests directory (#73)
moves all tests into a testing directory and splits the tests into separate files
Diffstat (limited to 'tests/test_websocket.py')
-rw-r--r--tests/test_websocket.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_websocket.py b/tests/test_websocket.py
new file mode 100644
index 00000000..d8a616bf
--- /dev/null
+++ b/tests/test_websocket.py
@@ -0,0 +1,12 @@
+from tests import SiteTest
+
+class TestWebsocketEcho(SiteTest):
+ """ Test cases for the echo endpoint """
+ def testEcho(self):
+ """ Check rudimentary websockets handlers work """
+ from geventwebsocket.websocket import WebSocket
+ from pysite.views.ws.echo import EchoWebsocket
+ ew = EchoWebsocket(WebSocket)
+ ew.on_open()
+ ew.on_message('message')
+ ew.on_close()