Handshake succeeds when checking origins and the origin is supported.
(self)
| 597 | ) |
| 598 | |
| 599 | def test_supported_origin(self): |
| 600 | """Handshake succeeds when checking origins and the origin is supported.""" |
| 601 | server = ServerProtocol( |
| 602 | origins=["https://example.com", "https://other.example.com"] |
| 603 | ) |
| 604 | request = make_request() |
| 605 | request.headers["Origin"] = "https://other.example.com" |
| 606 | response = server.accept(request) |
| 607 | server.send_response(response) |
| 608 | |
| 609 | self.assertHandshakeSuccess(server) |
| 610 | self.assertEqual(server.origin, "https://other.example.com") |
| 611 | |
| 612 | def test_unsupported_origin(self): |
| 613 | """Handshake fails when checking origins and the origin is unsupported.""" |
nothing calls this directly
no test coverage detected