Assert that the opening handshake failed with the given exception.
(self, server, exc_type, msg)
| 338 | self.assertIsNone(server.handshake_exc) |
| 339 | |
| 340 | def assertHandshakeError(self, server, exc_type, msg): |
| 341 | """Assert that the opening handshake failed with the given exception.""" |
| 342 | self.assertEqual(server.state, CONNECTING) |
| 343 | self.assertIsInstance(server.handshake_exc, exc_type) |
| 344 | exc = server.handshake_exc |
| 345 | exc_str = str(exc) |
| 346 | while exc.__cause__ is not None: |
| 347 | exc = exc.__cause__ |
| 348 | exc_str += "; " + str(exc) |
| 349 | self.assertEqual(exc_str, msg) |
| 350 | |
| 351 | def test_basic(self): |
| 352 | """Handshake succeeds.""" |
no outgoing calls
no test coverage detected