mirror of
https://github.com/django/django.git
synced 2025-10-26 07:06:08 +00:00
[5.0.x] Applied Black's 2024 stable style.
https://github.com/psf/black/releases/tag/24.1.0
Backport of 305757aec1 from main
This commit is contained in:
@@ -168,8 +168,9 @@ class ExecuteWrapperTests(TestCase):
|
||||
def test_nested_wrapper_invoked(self):
|
||||
outer_wrapper = self.mock_wrapper()
|
||||
inner_wrapper = self.mock_wrapper()
|
||||
with connection.execute_wrapper(outer_wrapper), connection.execute_wrapper(
|
||||
inner_wrapper
|
||||
with (
|
||||
connection.execute_wrapper(outer_wrapper),
|
||||
connection.execute_wrapper(inner_wrapper),
|
||||
):
|
||||
self.call_execute(connection)
|
||||
self.assertEqual(inner_wrapper.call_count, 1)
|
||||
@@ -182,8 +183,10 @@ class ExecuteWrapperTests(TestCase):
|
||||
|
||||
wrapper = self.mock_wrapper()
|
||||
c = connection # This alias shortens the next line.
|
||||
with c.execute_wrapper(wrapper), c.execute_wrapper(blocker), c.execute_wrapper(
|
||||
wrapper
|
||||
with (
|
||||
c.execute_wrapper(wrapper),
|
||||
c.execute_wrapper(blocker),
|
||||
c.execute_wrapper(wrapper),
|
||||
):
|
||||
with c.cursor() as cursor:
|
||||
cursor.execute("The database never sees this")
|
||||
|
||||
Reference in New Issue
Block a user