Skip to content
Browse files

Fixed #7751 -- Added check to allow for the fact that autocommit can …

…be a property, rather than a function on certain database backends. Thanks to Leo Soto for the fix.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 431206a commit 1107e6b47978cef0a511ed2ed247921d19d36803 @freakboy3742 freakboy3742 committed
Showing with 4 additions and 1 deletion.
  1. +4 −1 django/test/
5 django/test/
@@ -74,7 +74,10 @@ def teardown_test_environment():
def _set_autocommit(connection):
"Make sure a connection is in autocommit mode."
if hasattr(connection.connection, "autocommit"):
- connection.connection.autocommit(True)
+ if callable(connection.connection.autocommit):
+ connection.connection.autocommit(True)
+ else:
+ connection.connection.autocommit = True
elif hasattr(connection.connection, "set_isolation_level"):

0 comments on commit 1107e6b

Please sign in to comment.
Something went wrong with that request. Please try again.