From f8debafbd395a530675b120ba3d9e753711cdd03 Mon Sep 17 00:00:00 2001 From: Krukov D Date: Fri, 3 Jun 2016 02:25:55 +0300 Subject: [PATCH] Added path parameter to the HttpClient.send method (#193) --- channels/tests/http.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/channels/tests/http.py b/channels/tests/http.py index 4dd3840..fa4526c 100644 --- a/channels/tests/http.py +++ b/channels/tests/http.py @@ -56,14 +56,14 @@ class HttpClient(Client): self._session = session_for_reply_channel(self.reply_channel) return self._session - def send(self, to, content={}): + def send(self, to, content={}, path='/'): """ Send a message to a channel. Adds reply_channel name and channel_session to the message. """ content = copy.deepcopy(content) content.setdefault('reply_channel', self.reply_channel) - content.setdefault('path', '/') + content.setdefault('path', path) content.setdefault('headers', self.headers) self.channel_layer.send(to, content)