mardi 20 mars 2018

Django Ignoring Asynch Tests Completely (Django Channels)

I'm working on a web server running Python3.6, Django 2.0 and Channels 2.0.2. I'd like to build some tests to make sure my websocket consumers are behaving themselves, unfortunately, whenever I run the tests they are all ignored completely.

I've been following the official Channels documentation on testing, and I copied the code Channels uses to test its generic consumers as is but whenever I run the tests, the test runner simply reports that it ran no tests:

Creating test database for alias 'default'...
System check identified no issues (0 silenced).

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
Destroying test database for alias 'default'...

I get no errors or other warnings. I've double checked that I've installed pytest-asyncio and pytest-django, and I'm 100% sure the file itself is being loaded by placing a print statement at the top. All my other tests run normally. Any help is greatly appreciated.

Aucun commentaire:

Enregistrer un commentaire