Ticket #10831: 10831-test-case-nops-out-transaction-managed-func.diff
File 10831-test-case-nops-out-transaction-managed-func.diff, 1.1 KB (added by , 16 years ago) |
---|
-
django/test/testcases.py
34 34 real_leave_transaction_management = transaction.leave_transaction_management 35 35 real_savepoint_commit = transaction.savepoint_commit 36 36 real_savepoint_rollback = transaction.savepoint_rollback 37 real_managed = transaction.managed 37 38 38 39 def nop(*args, **kwargs): 39 40 return … … 45 46 transaction.savepoint_rollback = nop 46 47 transaction.enter_transaction_management = nop 47 48 transaction.leave_transaction_management = nop 49 transaction.managed = nop 48 50 49 51 def restore_transaction_methods(): 50 52 transaction.commit = real_commit … … 53 55 transaction.savepoint_rollback = real_savepoint_rollback 54 56 transaction.enter_transaction_management = real_enter_transaction_management 55 57 transaction.leave_transaction_management = real_leave_transaction_management 58 transaction.managed = real_managed 56 59 57 60 class OutputChecker(doctest.OutputChecker): 58 61 def check_output(self, want, got, optionflags):