MCPcopy Create free account
hub / github.com/websocket-client/websocket-client / test_read_header

Method test_read_header

websocket/tests/test_http.py:97–104  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

95
96class HttpTest(unittest.TestCase):
97 def test_read_header(self):
98 status, header, _ = read_headers(HeaderSockMock("data/header01.txt"))
99 self.assertEqual(status, 101)
100 self.assertEqual(header["connection"], "Upgrade")
101 # header02.txt is intentionally malformed
102 self.assertRaises(
103 WebSocketException, read_headers, HeaderSockMock("data/header02.txt")
104 )
105
106 def test_tunnel(self):
107 self.assertRaises(

Callers

nothing calls this directly

Calls 2

read_headersFunction · 0.90
HeaderSockMockClass · 0.70

Tested by

no test coverage detected