MCPcopy Create free account
hub / github.com/python-websockets/websockets / test_close_reason

Method test_close_reason

tests/legacy/test_protocol.py:418–420  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

416 self.assertEqual(self.protocol.close_code, CloseCode.GOING_AWAY)
417
418 def test_close_reason(self):
419 self.close_connection(CloseCode.GOING_AWAY, "Bye!")
420 self.assertEqual(self.protocol.close_reason, "Bye!")
421
422 def test_close_code_not_set(self):
423 self.assertIsNone(self.protocol.close_code)

Callers

nothing calls this directly

Calls 1

close_connectionMethod · 0.95

Tested by

no test coverage detected