Django: text fixture fails to load

Posted by Esteban Feldman on Stack Overflow See other posts from Stack Overflow or by Esteban Feldman
Published on 2010-04-28T23:18:42Z Indexed on 2010/05/01 13:17 UTC
Read the original article Hit count: 230

Filed under:
|
|

Hi all,

Did a dumpdata of my project, then in my new test I added it to fixtures.

from django.test import TestCase

class TestGoal(TestCase):
    fixtures = ['test_data.json']

    def test_goal(self):
        """
        Tests that 1 + 1 always equals 2.
        """
        self.failUnlessEqual(1 + 1, 2)

When running the test I get:

Problem installing fixture 'XXX/fixtures/test_data.json':

DoesNotExist: XXX matching query does not exist.

But manually doing loaddata works fine does not when the db is empty. I do a dropdb, createdb a simple syncdb the try loaddata and it fails, same error.

Any clue?

Python version 2.6.5, Django 1.1.1

© Stack Overflow or respective owner

Related posts about django

Related posts about test