Skip to content

Commit

Permalink
[change] Changed name application to channel_routing
Browse files Browse the repository at this point in the history
  • Loading branch information
niteshsinha17 authored and pandafy committed Dec 16, 2021
1 parent 2c0bc3e commit 67688a1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion django_loci/channels/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from django_loci.channels.base import location_broadcast_path
from django_loci.channels.consumers import LocationBroadcast

application = ProtocolTypeRouter(
channel_routing = ProtocolTypeRouter(
{
'websocket': AllowedHostsOriginValidator(
AuthMiddlewareStack(
Expand Down
4 changes: 2 additions & 2 deletions django_loci/tests/base/test_channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,6 @@ def _save_location(self, pk):
loc.save()

def test_routing(self):
from django_loci.channels.asgi import application
from django_loci.channels.asgi import channel_routing

assert isinstance(application, ProtocolTypeRouter)
assert isinstance(channel_routing, ProtocolTypeRouter)
2 changes: 1 addition & 1 deletion tests/openwisp2/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

ROOT_URLCONF = 'openwisp2.urls'

ASGI_APPLICATION = "django_loci.channels.asgi.application"
ASGI_APPLICATION = "django_loci.channels.asgi.channel_routing"
CHANNEL_LAYERS = {"default": {"BACKEND": "channels.layers.InMemoryChannelLayer"}}

TIME_ZONE = 'Europe/Rome'
Expand Down

0 comments on commit 67688a1

Please sign in to comment.