StaticLiveServerChannelTestCase
See original GitHub issue- Detailed description of the overall behaviour
django channels have basic functionality for UnitTests
I’m try write UnitTest based on StaticLiveServerTestCase, after I’m finished I found about ws not work there. Then I’m look at tests included inside in channels and find just ChannelTestCaseMixin. I’m write test:
class StaticLiveServerChannelTestCase(ChannelTestCaseMixin, StaticLiveServerTestCase): pass
and ws not work. - Reasoning why it should be in Channels rather than a third-party app Tests is good, StaticLiveServerTestCase is useful if you write functional tests with Selenium or other staff and that is bad if that type of tests not supports websockets.
- Examples of usage, if possible (it’s easier to discuss concrete code examples) I’m writing simple ToDo list based on django with channels and angular 4. Here is test which not work https://github.com/Akay7/ToDoList/blob/master/backend/functional_tests/tests.py#L37
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It’s already in master. Use
ChannelLiveServerTestCase
. It supports websockets and serves static by default.I used it but I got
AttributeError: Can't pickle local object 'convert_exception_to_response.<locals>.inner'