def make_transport(content='', state=0):
     mk(('echo.sock.spt', content))
     socket = make_socket()
     transport = XHRPollingTransport(socket)
     transport.timeout = 0.05  # for testing, could screw up the test
     if state == 1:
         transport.respond(Request(uri='/echo.sock'))
     return transport
Esempio n. 2
0
def make_transport(content='', state=0):
    mk(('echo.sock', content))
    socket = make_socket()
    transport = XHRPollingTransport(socket)
    transport.timeout = 0.05 # for testing, could screw up the test
    if state == 1:
        transport.respond(Request(uri='/echo.sock'))
    return transport
Esempio n. 3
0
 def make_transport(self, content="", state=0):
     self.fs.www.mk(("echo.sock.spt", content))
     socket = self.make_socket()
     transport = XHRPollingTransport(socket)
     transport.timeout = 0.05  # for testing, could screw up the test
     if state == 1:
         transport.respond(Request(uri="/echo.sock"))
     return transport