summaryrefslogtreecommitdiff
path: root/tests/delete_regress
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2013-03-02 20:25:25 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2013-03-11 14:48:53 +0100
commit7aacde84f2b499d9c35741cbfccb621af6b48903 (patch)
tree06b20c555a5110a5771ba75c05b7c904a97f8c2e /tests/delete_regress
parent9cec689e6a7e299b3416519ee075b2316ecc5a64 (diff)
downloaddjango-7aacde84f2b499d9c35741cbfccb621af6b48903.tar.gz
Made transaction.managed a no-op and deprecated it.
enter_transaction_management() was nearly always followed by managed(). In three places it wasn't, but they will all be refactored eventually. The "forced" keyword argument avoids introducing behavior changes until then. This is mostly backwards-compatible, except, of course, for managed itself. There's a minor difference in _enter_transaction_management: the top self.transaction_state now contains the new 'managed' state rather than the previous one. Django doesn't access self.transaction_state in _enter_transaction_management.
Diffstat (limited to 'tests/delete_regress')
-rw-r--r--tests/delete_regress/tests.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/delete_regress/tests.py b/tests/delete_regress/tests.py
index 9fcc19ba71..e88c95e229 100644
--- a/tests/delete_regress/tests.py
+++ b/tests/delete_regress/tests.py
@@ -22,9 +22,7 @@ class DeleteLockingTest(TransactionTestCase):
self.conn2 = new_connections[DEFAULT_DB_ALIAS]
# Put both DB connections into managed transaction mode
transaction.enter_transaction_management()
- transaction.managed(True)
self.conn2.enter_transaction_management()
- self.conn2.managed(True)
def tearDown(self):
# Close down the second connection.
@@ -335,7 +333,7 @@ class Ticket19102Tests(TestCase):
).select_related('orgunit').delete()
self.assertFalse(Login.objects.filter(pk=self.l1.pk).exists())
self.assertTrue(Login.objects.filter(pk=self.l2.pk).exists())
-
+
@skipUnlessDBFeature("update_can_self_select")
def test_ticket_19102_defer(self):
with self.assertNumQueries(1):