diff options
author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-03-11 15:10:58 +0100 |
---|---|---|
committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-03-11 15:10:58 +0100 |
commit | e654180ce2a11ef4c525497d6c40dc542e16806c (patch) | |
tree | 7658f47dfaafe0dd09fe62fd5525e8f6e6a41ba7 /tests/transactions | |
parent | f32100939e8ea8a2714e45e22467af5df55c8f33 (diff) | |
download | django-e654180ce2a11ef4c525497d6c40dc542e16806c.tar.gz |
Improved the API of set_autocommit.
Diffstat (limited to 'tests/transactions')
-rw-r--r-- | tests/transactions/tests.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/transactions/tests.py b/tests/transactions/tests.py index 42a78ad4ba..e5a608e583 100644 --- a/tests/transactions/tests.py +++ b/tests/transactions/tests.py @@ -269,19 +269,19 @@ class AtomicMergeTests(TransactionTestCase): class AtomicErrorsTests(TransactionTestCase): def test_atomic_requires_autocommit(self): - transaction.set_autocommit(autocommit=False) + transaction.set_autocommit(False) try: with self.assertRaises(transaction.TransactionManagementError): with transaction.atomic(): pass finally: - transaction.set_autocommit(autocommit=True) + transaction.set_autocommit(True) def test_atomic_prevents_disabling_autocommit(self): autocommit = transaction.get_autocommit() with transaction.atomic(): with self.assertRaises(transaction.TransactionManagementError): - transaction.set_autocommit(autocommit=not autocommit) + transaction.set_autocommit(not autocommit) # Make sure autocommit wasn't changed. self.assertEqual(connection.autocommit, autocommit) |