MCPcopy
hub / github.com/aio-libs/aiohttp / setUp

Method setUp

tests/test_websocket_client.py:14–21  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

12class TestWebSocketClient(unittest.TestCase):
13
14 def setUp(self):
15 self.loop = asyncio.new_event_loop()
16 asyncio.set_event_loop(None)
17
18 self.key_data = os.urandom(16)
19 self.key = base64.b64encode(self.key_data)
20 self.ws_key = base64.b64encode(
21 hashlib.sha1(self.key + websocket.WS_KEY).digest()).decode()
22
23 def tearDown(self):
24 self.loop.close()

Callers

nothing calls this directly

Calls 1

decodeMethod · 0.80

Tested by

no test coverage detected