Hello, I have the following simple test which demonstrates the confusing behaviour I'm seeing:
class AvailabilityTestCase(django.test.TestCase): fixtures = FIXTURE_LIST def setUp(self): response = self.client.login(username='testuser', password='password') self.assertTrue(response) def test_page(self): print Calendar.objects.all() print Calendar.objects.all() def test_page_again(self): print Calendar.objects.all() print Calendar.objects.all() When I run this from "manage.py test", it prints out four lists of Calendars as expected. However, the second two, are slightly different to the first two. As far as I'm aware I'm not doing anything to the all() method (or subscribing in to any triggers) that might cause this. But even if I was, my understanding is that the fixtures are refreshed for each test so they can run independently of each other. In my case, which ever order I run these two tests the second set always prints different results to the first. The only clue I have to go on (as this doesn't happen with the Auth or Group models) is that the Calendar model has a GenericForeignKey field, and it is this field which seems to be different in the second two Calendar lists (even though the content_type, and object_id are correct). Incidentally, if I add a third and fourth test, they also show the incorrect list. And obviously, the behaviour isn't seen if I refresh a list of Calendar objects in the admin, or run the code in the interactive shell. Any thoughts on what I'm missing. Thanks for taking the time. Andy. --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---