Add websocket transport
This commit is contained in:
parent
601ba59971
commit
978a669d16
13 changed files with 250 additions and 78 deletions
|
|
@ -6,7 +6,7 @@ from .. import SocketIO, LoggingNamespace, find_callback
|
|||
|
||||
|
||||
HOST = 'localhost'
|
||||
PORT = 8000
|
||||
PORT = 9000
|
||||
DATA = 'xxx'
|
||||
PAYLOAD = {'xxx': 'yyy'}
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
|
|
@ -159,10 +159,21 @@ class Test_XHR_PollingTransport(BaseMixin, TestCase):
|
|||
def setUp(self):
|
||||
super(Test_XHR_PollingTransport, self).setUp()
|
||||
self.socketIO = SocketIO(HOST, PORT, LoggingNamespace, transports=[
|
||||
'xhr-polling'])
|
||||
'xhr-polling'], verify=False)
|
||||
self.assertEqual(self.socketIO.transport_name, 'xhr-polling')
|
||||
self.wait_time_in_seconds = 1
|
||||
|
||||
|
||||
class Test_WebsocketTransport(BaseMixin, TestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(Test_WebsocketTransport, self).setUp()
|
||||
self.socketIO = SocketIO(HOST, PORT, LoggingNamespace, transports=[
|
||||
'xhr-polling', 'websocket'], verify=False)
|
||||
self.assertEqual(self.socketIO.transport_name, 'websocket')
|
||||
self.wait_time_in_seconds = 0.1
|
||||
|
||||
|
||||
class Namespace(LoggingNamespace):
|
||||
|
||||
def initialize(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue