views:

181

answers:

2

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']

I do use TestCase of django.tests and not unittest.

But the fixtures are not loaded. What am I missing? Thanks, Arshavski Alexander.

A: 

Forgot the xml-extension?

class Funtionality(TestCase): fixtures = ['cms_sample_data.xml']
drmegahertz
No. It doesn't work with xml either.
alexarsh
A: 

perhaps your cms_sample_data file is error. you can use this comand: manage.py loaddata cms_sample_data

to check the file.

Maplye
I checked it. The file works with loaddata.
alexarsh