Ticket #20647: 20647-test.diff

File 20647-test.diff, 749 bytes (added by Tim Graham, 11 years ago)
  • tests/select_for_update/tests.py

    diff --git a/tests/select_for_update/tests.py b/tests/select_for_update/tests.py
    index f9e7e96..5c2743f 100644
    a b class SelectForUpdateTests(TransactionTestCase):  
    137137            Person.objects.all().select_for_update(nowait=True)
    138138        )
    139139
     140    @skipUnlessDBFeature('has_select_for_update')
     141    def test_select_for_update_str(self):
     142        # regression test for #20647
     143        self.assertEqual(
     144            str(Person.objects.all().select_for_update()),
     145            '[<Person: Person object>]'
     146        )
     147
    140148    def run_select_for_update(self, status, nowait=False):
    141149        """
    142150        Utility method that runs a SELECT FOR UPDATE against all
Back to Top