2👍
One option to have a good sleep and don’t even think about test discovery is to use nose. It has a lot features, one of it is automatic tests discovery.
There is package called django_nose that will help you to integrate your django project with nose:
Features
All the goodness of nose in your Django tests, like…
- …
- Obviating the need to import all your tests into
tests/__init__.py
. This not only saves busy-work but also eliminates the possibility of accidentally shadowing test classes.- …
Hope that helps.
2👍
You will require to change your Tests
to tests
and import every test to tests/__init__.py
up until django 1.5 AFAIK. Also there is a test runner which will work the way unittest2 discovery work. This functionality has been integrated into django1.6.
- [Django]-Django: OR queries with dynamic field names
- [Django]-How to extract parrticular value from nested json values.?
- [Django]-Django: don't log out when there is an error in view with `request.session.set_exipry`
- [Django]-Doubled POST requests instead of single
- [Django]-Can I drop into interactive mode at a breakpoint in pycharm3
1👍
Have a look at: running tests in Django
Test discovery is based on the unittest module’s built-in test discovery. By default, this will discover tests in any file named “test*.py” under the current working directory.
- [Django]-Django REST Framework: nested serializer not serializing
- [Django]-PDF links getting stuck while loading in Chrome PDF Viewer