diff options
Diffstat (limited to 'test/test_websockets.py')
-rw-r--r-- | test/test_websockets.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/test_websockets.py b/test/test_websockets.py new file mode 100644 index 00000000..d7e1627f --- /dev/null +++ b/test/test_websockets.py @@ -0,0 +1,15 @@ +from netlib import test +from netlib.websockets import implementations as ws + +class TestWebSockets(test.ServerTestBase): + handler = ws.WebSocketsEchoHandler + + def test_websockets_echo(self): + msg = "hello I'm the client" + client = ws.WebSocketsClient(("127.0.0.1", self.port)) + client.connect() + client.send_message(msg) + response = client.read_next_message() + print "Assert response: " + response + " == msg: " + msg + assert response == msg + |