示例#1
0
 def test_it_doesnt_filter_exception_events(self,
                                            unexpected_exception_event):
     assert is_ws4py_handshake_error(unexpected_exception_event) is False
示例#2
0
 def test_doesnt_filter_out_other_handshake_errors(self):
     event = exception_event(ws4py.exc.HandshakeError("Some other message"))
     assert is_ws4py_handshake_error(event) is False
示例#3
0
 def test_it_doesnt_filter_other_logger_events(self,
                                               unexpected_logger_event):
     assert is_ws4py_handshake_error(unexpected_logger_event) is False
示例#4
0
    def test_it_filters_handshake_error_http_upgrade_events(self):
        event = exception_event(
            ws4py.exc.HandshakeError("Header HTTP_UPGRADE is not defined"))

        assert is_ws4py_handshake_error(event) is True