Problem with UUID inside url route in async testing #1803
-
I've built a simple chatroom and now I want to code a test to verify if Its connecting. Following the tutorial in Channels docs i come up with the following test:
My problem is that I need to substitute
But if I use the same method inside
I get this error How can I solve this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You need to use |
Beta Was this translation helpful? Give feedback.
You need to use
sync_to_async()
... See the Database access section of the docs.