def tearDown(self):
        try:
            # We don't really care if this fails - some of the tests will set
            # this in the course of their run.
            transaction.managed(False)
            transaction.leave_transaction_management()
            self.new_connection.leave_transaction_management()
        except transaction.TransactionManagementError:
            pass
        self.new_connection.close()
        settings.DEBUG = self._old_debug
        try:
            self.end_blocking_transaction()
        except (DatabaseError, __HOLE__):
            pass
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/tests/modeltests/select_for_update/tests.py/SelectForUpdateTests.tearDown