Ticket #7751: autocommit.diff
File autocommit.diff, 672 bytes (added by , 16 years ago) |
---|
-
django/test/utils.py
diff -r 1142c4cdf9ae django/test/utils.py
a b 74 74 def _set_autocommit(connection): 75 75 "Make sure a connection is in autocommit mode." 76 76 if hasattr(connection.connection, "autocommit"): 77 connection.connection.autocommit(True) 77 if callable(connection.connection.autocommit): 78 connection.connection.autocommit(True) 79 else: 80 connection.connection.autocommit = True 78 81 elif hasattr(connection.connection, "set_isolation_level"): 79 82 connection.connection.set_isolation_level(0) 80 83