Hi, Thanks for the reply. Checked both things and it's fine. I mean, I can load the fixtures with loaddata and I'm importing from django.test. Any other ideas?
On Feb 1, 4:28 pm, Russell Keith-Magee <freakboy3...@gmail.com> wrote: > On Mon, Feb 1, 2010 at 10:01 PM, knight <alexar...@gmail.com> wrote: > > Hi, > > > I want to use some fixtures in my tests. > > I have cms_sample app and a fixtures folder inside with > > cms_sample_data.xml > > > I use the following in my test.py: > > > class Funtionality(TestCase): > > fixtures = ['cms_sample_data'] > > There are two likely causes. Firstly, are you importing: > > from unittest import TestCase > > or > > from django.test import TestCase > > ? If you are importing from unittest, you don't get any of Django's > fixture support. > > Secondly, are you sure that your fixture exists and is formatted > correctly? If your fixture has errors in it, you may not see any test > data. Try running ./manage.py loaddata cms_sample_data and see what > happens. > > Yours, > Russ Magee %-) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.