mirror of
https://github.com/django/daphne.git
synced 2025-07-14 09:52:17 +03:00
Better spacing in routing tests
This commit is contained in:
parent
c36a33ab96
commit
3cdf51ed84
|
@ -1,6 +1,5 @@
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
from django.test import SimpleTestCase
|
from django.test import SimpleTestCase
|
||||||
from django.utils import six
|
|
||||||
|
|
||||||
from channels.routing import Router, route, include
|
from channels.routing import Router, route, include
|
||||||
from channels.message import Message
|
from channels.message import Message
|
||||||
|
@ -10,14 +9,18 @@ from channels.utils import name_that_thing
|
||||||
# Fake consumers and routing sets that can be imported by string
|
# Fake consumers and routing sets that can be imported by string
|
||||||
def consumer_1():
|
def consumer_1():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def consumer_2():
|
def consumer_2():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def consumer_3():
|
def consumer_3():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
chatroom_routing = [
|
chatroom_routing = [
|
||||||
route("websocket.connect", consumer_2, path=r"^/chat/(?P<room>[^/]+)/$"),
|
route("websocket.connect", consumer_2, path=r"^/chat/(?P<room>[^/]+)/$"),
|
||||||
route("websocket.connect", consumer_3, path=r"^/mentions/$"),
|
route("websocket.connect", consumer_3, path=r"^/mentions/$"),
|
||||||
]
|
]
|
||||||
|
|
||||||
chatroom_routing_noprefix = [
|
chatroom_routing_noprefix = [
|
||||||
route("websocket.connect", consumer_2, path=r"/chat/(?P<room>[^/]+)/$"),
|
route("websocket.connect", consumer_2, path=r"/chat/(?P<room>[^/]+)/$"),
|
||||||
route("websocket.connect", consumer_3, path=r"/mentions/$"),
|
route("websocket.connect", consumer_3, path=r"/mentions/$"),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user