A way to have Django apps specific test runners
|Reported by:||Miguel Araujo||Owned by:||nobody|
|Severity:||Normal||Keywords:||tests, testrunner, testing|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I maintain an application named <a href="https://github.com/maraujop/django-rules">django-rules</a> that for testing has a an app specific test runner, named
I got <a href="https://github.com/maraujop/django-rules/issues/10">this ticket openned</a>. When testing django-rules through the common approach
python manage.py test django_rules it breaks. This is because running tests this way, Django autodetects my
TestCases but doesn't use the runner itself, which has some test preparation (custom settings, real models only for testing).
Apparently there is no way to tell Django to use my runner for running tests, and Django doesn't automatically use the runner either. I could probably adapt my test suite to use new
@override_setting decorator and mock objects. But the behavior I'm testing is very specific and attached to models itself.
What do you think? seems a reasonable use case?