MCPcopy Index your code
hub / github.com/python-websockets/websockets / test_send_message

Method test_send_message

tests/test_cli.py:79–89  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

77 )
78
79 def test_send_message(self):
80 def echo_handler(websocket):
81 websocket.send(websocket.recv())
82
83 with run_server(echo_handler) as server:
84 server_uri = get_uri(server)
85 output = self.run_main([server_uri], "hello\n")
86 self.assertEqual(
87 remove_commands_and_prompts(output),
88 add_connection_messages("\n< hello\n", server_uri),
89 )
90
91 def test_close_connection(self):
92 def wait_handler(websocket):

Callers

nothing calls this directly

Calls 5

run_mainMethod · 0.95
run_serverFunction · 0.85
add_connection_messagesFunction · 0.85
get_uriFunction · 0.50

Tested by

no test coverage detected