Here are the examples of the python api twisted.test.test_policies.Server taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
3
Example 1
Project: mamba-framework Source File: test_websocket.py
def setUp(self):
self.server = test_policies.Server()
tServer = TestableWebSocketFactory(task.Clock(), self.server)
self.port = tServer.buildProtocol(
address.IPv4Address('TCP', '127.0..0.1', 0))
self.tr = proto_helpers.StringTransportWithDisconnection()
self.tr.protocol = self.port
self.port.makeConnection(self.tr)
self.port.producer = self.port.wrappedProtocol