'A TransactionManagementError is raised
when a select_for_update query is executed outside of a transaction.'

@skipUnlessDBFeature('has_select_for_update')
def test_for_update_requires_transaction(self):

    msg = 'select_for_update    cannot    be    used    outside    of    a    transaction.'
    with self.assertRaisesMessage(transaction.TransactionManagementError, msg):
        list(Person.objects.all().select_for_update())
