MCPcopy
hub / github.com/tornadoweb/tornado / test_websocket_callbacks

Method test_websocket_callbacks

tornado/test/websocket_test.py:336–348  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

334 self.assertEqual(response, "hello")
335
336 def test_websocket_callbacks(self):
337 with ignore_deprecation():
338 websocket_connect(
339 "ws://127.0.0.1:%d/echo" % self.get_http_port(), callback=self.stop
340 )
341 ws = self.wait().result()
342 ws.write_message("hello")
343 ws.read_message(self.stop)
344 response = self.wait().result()
345 self.assertEqual(response, "hello")
346 self.close_future.add_done_callback(lambda f: self.stop())
347 ws.close()
348 self.wait()
349
350 @gen_test
351 def test_binary_message(self):

Callers

nothing calls this directly

Calls 9

ignore_deprecationFunction · 0.90
websocket_connectFunction · 0.90
resultMethod · 0.80
read_messageMethod · 0.80
get_http_portMethod · 0.45
waitMethod · 0.45
write_messageMethod · 0.45
stopMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected