diff --git a/channels/routing.py b/channels/routing.py index 8e1fd44..8f39dc9 100644 --- a/channels/routing.py +++ b/channels/routing.py @@ -194,7 +194,7 @@ class Include(object): """ def __init__(self, routing, **kwargs): - self.routing = Routing.resolve_routing(routing) + self.routing = Router.resolve_routing(routing) self.prefixes = kwargs # Sanity check prefix regexes for name, value in self.prefixes.items(): diff --git a/channels/tests/test_routing.py b/channels/tests/test_routing.py index 5fcd2a3..9a06008 100644 --- a/channels/tests/test_routing.py +++ b/channels/tests/test_routing.py @@ -215,7 +215,7 @@ class RoutingTests(SimpleTestCase): Tests that regexes with positional groups are rejected. """ with self.assertRaises(ValueError): - Consumerrouter([ + Router([ route("http.request", consumer_1, path=r"^/chat/([^/]+)/$"), ]) @@ -225,10 +225,10 @@ class RoutingTests(SimpleTestCase): starting with ^, and the included filter not starting with ^. """ with self.assertRaises(ValueError): - Consumerrouter([ + Router([ include("channels.tests.test_routing.chatroom_routing", path="foobar"), ]) with self.assertRaises(ValueError): - Consumerrouter([ + Router([ include("channels.tests.test_routing.chatroom_routing_noprefix", path="^/foobar/"), ])