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

Method assertHandshakeError

tests/test_client.py:335–341  ·  view source on GitHub ↗

Assert that the opening handshake failed with the given exception.

(self, client, exc_type, msg)

Source from the content-addressed store, hash-verified

333 self.assertIsNone(client.handshake_exc)
334
335 def assertHandshakeError(self, client, exc_type, msg):
336 """Assert that the opening handshake failed with the given exception."""
337 self.assertEqual(client.state, CONNECTING)
338 self.assertIsInstance(client.handshake_exc, exc_type)
339 # Exception chaining isn't used is client handshake implementation.
340 assert client.handshake_exc.__cause__ is None
341 self.assertEqual(str(client.handshake_exc), msg)
342
343 def test_basic(self):
344 """Handshake succeeds."""

Calls

no outgoing calls

Tested by

no test coverage detected