mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Improved test coverage for django.db.transaction.
This commit is contained in:
@@ -129,6 +129,19 @@ class TransactionsPerRequestTests(TransactionTestCase):
|
||||
finally:
|
||||
connection.settings_dict["ATOMIC_REQUESTS"] = old_atomic_requests
|
||||
self.assertContains(response, "False")
|
||||
try:
|
||||
connection.settings_dict["ATOMIC_REQUESTS"] = True
|
||||
response = self.client.get("/not_in_transaction_using_none/")
|
||||
finally:
|
||||
connection.settings_dict["ATOMIC_REQUESTS"] = old_atomic_requests
|
||||
self.assertContains(response, "False")
|
||||
try:
|
||||
connection.settings_dict["ATOMIC_REQUESTS"] = True
|
||||
response = self.client.get("/not_in_transaction_using_text/")
|
||||
finally:
|
||||
connection.settings_dict["ATOMIC_REQUESTS"] = old_atomic_requests
|
||||
# The non_atomic_requests decorator is used for an incorrect table.
|
||||
self.assertContains(response, "True")
|
||||
|
||||
|
||||
@override_settings(ROOT_URLCONF="handlers.urls")
|
||||
|
||||
Reference in New Issue
Block a user