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!