Added test to cover #25
This commit is contained in:
parent
65c4160c8e
commit
e75fbeb2e3
2 changed files with 16 additions and 1 deletions
|
|
@ -138,7 +138,7 @@ class BaseMixin(object):
|
|||
'ack_callback_response': (PAYLOAD,),
|
||||
})
|
||||
|
||||
def test_namespaces(self):
|
||||
def test_namespace_emit(self):
|
||||
'Behave differently in different namespaces'
|
||||
main_namespace = self.socketIO.define(Namespace)
|
||||
chat_namespace = self.socketIO.define(Namespace, '/chat')
|
||||
|
|
@ -151,6 +151,16 @@ class BaseMixin(object):
|
|||
'emit_with_payload_response': (PAYLOAD,),
|
||||
})
|
||||
|
||||
def test_namespace_ack(self):
|
||||
'Trigger server callback'
|
||||
chat_namespace = self.socketIO.define(Namespace, '/chat')
|
||||
chat_namespace.emit('ack', PAYLOAD)
|
||||
self.socketIO.wait(self.wait_time_in_seconds)
|
||||
self.assertEqual(chat_namespace.args_by_event, {
|
||||
'ack_response': (PAYLOAD,),
|
||||
'ack_callback_response': (PAYLOAD,),
|
||||
})
|
||||
|
||||
|
||||
class Test_WebsocketTransport(TestCase, BaseMixin):
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue