These are chat archives for django/django

16th
Aug 2015
Alexey Kalinin
@Alkalit
Aug 16 2015 11:44

Hi folks. I have a problem with tests running. The point is that my tests work out successfully only if they are launched separately. For example.

If I run the tests as follows:

$ python manage.py test frontend.tests.test_views.IndexViewTest

it gives:

(Many error messages skipped)
Ran 10 tests in 0.419s

FAILED (failures = 1, errors = 8)

But if I run tests individually, say

$ python manage.py test frontend.tests.test_views.IndexViewTest.test_template_used

they pass. So all the testcases passed if launched in such a manner. But it's about only tests for views. Tests for a models and other works fine.
I also searched for solution and I found only this, but there is no answer:

http://stackoverflow.com/questions/20481804/django-unit-tests-failing-when-run-with-other-test-cases

Here is app repo
https://github.com/Alkalit/python-news-digest/blob/6dd8399f2a08ac07939c42ab777cfc79375f684a/frontend/tests/test_views.py