예제 #1
0
    def setUp(self):
        t = FakeTransport()
        f = WebSocketClientFactory()
        f.log = txaio.make_logger()
        p = WebSocketClientProtocol()
        p.log = txaio.make_logger()
        p.factory = f
        p.transport = t
        p._transport_details = TransportDetails()

        p._connectionMade()
        p.state = p.STATE_OPEN
        p.websocket_version = 18

        self.protocol = p
        self.transport = t
예제 #2
0
    def setUp(self):
        t = FakeTransport()
        f = WebSocketClientFactory()
        p = WebSocketClientProtocol()
        p.factory = f
        p.transport = t
        p._create_transport_details = Mock()

        p._connectionMade()
        p.state = p.STATE_OPEN
        p.websocket_version = 18

        self.protocol = p
        self.transport = t
예제 #3
0
    def setUp(self):
        t = FakeTransport()
        f = WebSocketClientFactory()
        p = WebSocketClientProtocol()
        p.factory = f
        p.transport = t
        p._create_transport_details = Mock()

        p._connectionMade()
        p.state = p.STATE_OPEN
        p.websocket_version = 18

        self.protocol = p
        self.transport = t