Hi,

I've got an application called myapp

In the main folder of django project there is initial_data.json file
containing initial data for the application
I also have file "simplefix.json" situated in myapp/fixtures
containing initial data for tests

Then after calling: python manage.py test myapp:

the following output is shown:

(...creating tables and indexes....)

Installing json fixture 'initial_data' from absolute path.
Installed 114 object(s) from 1 fixture(s)
hello

myapp/tests.py has the following content:


from django.test import TestCase

class SimpleTestCase(TestCase):

    fixtures = ['simplefix.json']

    def testOne(self):
        print 'hello'


How can I load database during tests from defined fixture? I tried
putting simplefix.json in myapp/ in main project folder, in fixtures
directory in main project folder and none of that worked

Regards,
Marek

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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
-~----------~----~----~----~------~----~------~--~---

Reply via email to