[Channels] Unit tests simulating two connections

12 views
Skip to first unread message

Luís Antonio De Marchi

unread,
May 10, 2017, 5:34:51 PM5/10/17
to Django users
First of all I'm sorry for my English, I'm supported by the translator.

I'm trying to simulate 2 simultaneous connections in my unit tests, but channel name gets repeated and causes the system to "ignore" one of the connections.

self._send_and_consume('websocket.connect', {"text": "", "path": "/"})
--> message.reply_channel.name = defaultwddHR
 

self._send_and_consume('websocket.connect', {"text": "", "path": "/"})
--> message.reply_channel.name = defaultwddHR

The two calls go through every stream, but I used the connection name as the primary key. So when I'm having trouble doing tests.

PS: Running in "real" environment works. Is random channel name.
Reply all
Reply to author
Forward
0 new messages