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

Method test_generate_key

tests/test_utils.py:15–17  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

13
14class UtilsTests(unittest.TestCase):
15 def test_generate_key(self):
16 key = generate_key()
17 self.assertEqual(len(base64.b64decode(key.encode())), 16)
18
19 def test_accept_key(self):
20 self.assertEqual(accept_key(KEY), ACCEPT)

Callers

nothing calls this directly

Calls 2

generate_keyFunction · 0.90
encodeMethod · 0.45

Tested by

no test coverage detected