Django channels 2, accessing db in tests
问题 I recently updated my project to Django 2 and channels 2. Right now I am trying to rewrite my tests for chat app. I am facing a problem with tests that depend on django db mark from pytest-django. I tried to create objects in fixtures, setup methods, in test function itself, using async_to_sync on WebsocketCommunicator . However, none of those worked. If I create a user in a fixture and save it correctly gets an id. However, in my consumer Django does not see that User in the database. And