mirror of
https://github.com/django/daphne.git
synced 2025-04-20 08:42:18 +03:00
Added method join_group to the test Client
This commit is contained in:
parent
04cfafeaf5
commit
3c03b44af7
|
@ -7,6 +7,7 @@ from functools import wraps
|
|||
|
||||
from django.test.testcases import TestCase
|
||||
from .. import DEFAULT_CHANNEL_LAYER
|
||||
from ..channel import Group
|
||||
from ..routing import Router, include
|
||||
from ..asgi import channel_layers, ChannelLayerWrapper
|
||||
from ..message import Message
|
||||
|
@ -133,6 +134,9 @@ class Client(object):
|
|||
if message:
|
||||
return message.content
|
||||
|
||||
def join_group(self, group_name):
|
||||
Group(group_name).add(self.reply_channel)
|
||||
|
||||
|
||||
class apply_routes(object):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user