I hope not to make a fool of myself by re-asking this question, but I just can't figure out why my fixtures are not loaded when running test. I am using python 2.7.5 and Django 1.5.3.
I can load my fixtures with python manage.py testserver test_winning_answers
, with a location of survey/fixtures/test_winning_answers.json
.
Creating test database for alias 'default'...
Installed 13 object(s) from 1 fixture(s)
Validating models...
0 errors found
My test class is doing the correct import:
from django.test import TestCase
class QuestionWinningAnswersTest(TestCase):
fixtures = ['test_winning_answers.json']
...
But when trying to run the test command, it cannot find them:
python manage.py test survey.QuestionWinningAnswersTest -v3
...
Checking '/django/mysite/survey/fixtures' for fixtures...
...
No json fixture 'initial_data' in '/django/mysite/survey/fixtures'.
...
Installed 0 object(s) from 0 fixture(s)
...
I suspect I am missing something obvious, but cannot quite figure it out... any suggestion would be appreciated. Thanks!