Ticket #26264: 26264-test.diff

File 26264-test.diff, 735 bytes (added by Tim Graham, 9 years ago)
  • tests/prefetch_related/test_uuid.py

    diff --git a/tests/prefetch_related/test_uuid.py b/tests/prefetch_related/test_uuid.py
    index 8d885e1..3784dfc 100644
    a b class UUIDPrefetchRelated(TestCase):  
    4444        with self.assertNumQueries(0):
    4545            self.assertEqual(2, len(flea.pets_visited.all()))
    4646
     47    def test_prefetch_related_from_uuid_model_to_uuid_model(self):
     48        Pet.objects.create(name='Fifi').people.add(
     49            Person.objects.create(name='Ellen'),
     50            Person.objects.create(name='George'),
     51        )
     52        list(Pet.objects.prefetch_related('fleas_hosted').values_list('id', flat=True))
     53
    4754
    4855class UUIDPrefetchRelatedLookups(TestCase):
    4956
Back to Top