Issues are for concrete, actionable bugs and feature requests only - if you're just asking for debugging help or technical support we have to direct you elsewhere. If you just have questions or support requests please use:
What you expected to happen vs. what actually happened
I want to testing the websocket url about testing url in django, you should use reverse() let django url to match the name to route, but django didn,t support not View class url
How you're running Channels (runserver? daphne/runworker? Nginx/Apache in front?)
Daphne
Console logs and full tracebacks of any errors
Traceback (most recent call last):
File "C:\Users\cxz12\PycharmProjects\PetMonitoringSystemBackend\api\tests\unit\routing\test_routing.py", line 41, in test_notify_consumer_routing
url = reverse('notify-consumer', kwargs={'username': 'testuser'})
File "C:\Users\cxz12\.virtualenvs\PetMonitoringSystemBackend-NwbnpaKV\lib\site-packages\django\urls\base.py", line 88, in reverse
return resolver._reverse_with_prefix(view, prefix, *args, **kwargs)
File "C:\Users\cxz12\.virtualenvs\PetMonitoringSystemBackend-NwbnpaKV\lib\site-packages\django\urls\resolvers.py", line 828, in _reverse_with_prefix
raise NoReverseMatch(msg)
django.urls.exceptions.NoReverseMatch: Reverse for 'notify-consumer' not found. 'notify-consumer' is not a valid view function or pattern name.
Issues are for concrete, actionable bugs and feature requests only - if you're just asking for debugging help or technical support we have to direct you elsewhere. If you just have questions or support requests please use:
We have to limit this because of limited volunteer time to respond to issues!
Please also try and include, if you can:
pip freeze
output showing your package versionsHere is my routing.py
My Testing test_routing.py
Daphne