Ticket #23791: 23791-test.diff

File 23791-test.diff, 526 bytes (added by Tim Graham, 10 years ago)
  • tests/one_to_one/tests.py

    diff --git a/tests/one_to_one/tests.py b/tests/one_to_one/tests.py
    index f59749f..d89ab07 100644
    a b class OneToOneTests(TestCase):  
    438438        # refs #21563
    439439        self.assertFalse(hasattr(Director(), 'director'))
    440440        self.assertFalse(hasattr(School(), 'school'))
     441
     442    def test_subquery_non_id_pk(self):
     443        q1 = Restaurant.objects.filter(id=1)
     444        q2 = Restaurant.objects.filter(pk__in=q1)
     445        self.assertEqual(len(q2), 1)
Back to Top