Re: fixtures for test fail to load

2010-04-30 Thread zinckiwi
> If your fixture only contains B objects, then importing will fail if > the A objects they're keyed to don't exist. Test databases are blank > aside from fixtures, so the test DB and blank DB are telling you the > same thing. You'll need to ensure that you have fixtures not only for > the models y

Re: fixtures for test fail to load

2010-04-30 Thread zinckiwi
Your fixture probably contains objects whose model(s) contain foreign keys to other objects. class A(models.Model): pass class B(models.Model): a = models.ForeignKey(A) If your fixture only contains B objects, then importing will fail if the A objects they're keyed to don't exist. Test dat

Re: fixtures for test fail to load

2010-04-28 Thread eka (Esteban)
Found that loaddata also doesn't work when the DB has no records. Same error. On Apr 28, 7:47 pm, "eka (Esteban)" wrote: > Hi all, > > Did a dumpdata of my project, then added that to my test and I get: > DoesNotExist: XXX matching query does not exist. > The strange thing is that manually loadi

fixtures for test fail to load

2010-04-28 Thread eka (Esteban)
Hi all, Did a dumpdata of my project, then added that to my test and I get: DoesNotExist: XXX matching query does not exist. The strange thing is that manually loading it using loaddata works perfectly. Any clue? Note: Using django.test.TestCase -- You received this message because you are subs