I am writing an integration test that loads a page, which somewhere 
internally calls get_channel_layer().send() to my ChannelNameRouter. I want 
the event to be consumed and then make various assertions.

I think that I need to instantiate an ApplicationCommunicator with my 
application instance from routing.py, and then cause the message to be 
consumed by calling .receive_output(), but when I do that I get a timeout. 
I can also see the ApplicationCommunicator's input_queue is empty, so it 
seems like the message never reaches the ApplicationCommunicator. I can see 
the message sitting in the channel layer (InMemoryChannelLayer.channels), 
and my application works fine when I test it manually. But is the 
ApplicationCommunicator supposed to get the message from the channel layer? 
How can I troubleshoot where the message gets stuck?

Thank you!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/73c8e574-4fd9-4c9b-8141-945c2dd59ea5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to