There is a very handy way to send a message and wait for a backward message in django-channels testing module:
from channels.testing import WebsocketCommunica