(self)
| 808 | |
| 809 | @gen_test |
| 810 | def test_manual_ping(self): |
| 811 | ws = yield self.ws_connect("/") |
| 812 | |
| 813 | self.assertRaises(ValueError, ws.ping, "a" * 126) |
| 814 | |
| 815 | ws.ping("hello") |
| 816 | resp = yield ws.read_message() |
| 817 | # on_ping always sees bytes. |
| 818 | self.assertEqual(resp, b"hello") |
| 819 | |
| 820 | ws.ping(b"binary hello") |
| 821 | resp = yield ws.read_message() |
| 822 | self.assertEqual(resp, b"binary hello") |
| 823 | |
| 824 | |
| 825 | class MaxMessageSizeTest(WebSocketBaseTestCase): |
nothing calls this directly
no test coverage detected