I am using Django v1.2 The fixture I defined "forum_fixtures.json" don't seem to be loading when I run tests.
from django.test.client import Client from django.test import TestCase from utils import * from forum.models import * from forum import auth from django.contrib.contenttypes.models import ContentType class UserProfileTestCases(TestCase): """These are tests to verify that refactoring of UserProfile is correct""" fixtures = ['forum_fixtures.json'] ## @ forum/fixtures/ forum_fixtures.json def setUp(self): self.client = Client() if self.client.login(username='DickCheney', password='test'): print "client.login DickCheney successful"; else: print "client.login FAILED" def test_set_new_email(self): orig_email = User.objects.get(username='DickCheney') response = self.client.post('changeemail', {u'email':'cockgobb...@nwo.gov'}) self.assertNotEqual(User.objects.get(username='DickCheney').email, orig_email) I ran the tests verbosely: python manage.py test --verbosity=2 Django only looked for fixtures named 'initial_data'. Not once was there are search for 'forum_fixtures.json' I changed the fixture name to 'initial_data.json' and it now works. I just thought I'd post the work around. -- 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.