mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #33476 -- Refactored problematic code before reformatting by Black.
In these cases Black produces unexpected results, e.g.
def make_random_password(
self,
length=10,
allowed_chars='abcdefghjkmnpqrstuvwxyz' 'ABCDEFGHJKLMNPQRSTUVWXYZ' '23456789',
):
or
cursor.execute("""
SELECT ...
""",
[table name],
)
This commit is contained in:
@@ -437,8 +437,7 @@ class AssertNumQueriesContextManagerTests(TestCase):
|
||||
|
||||
def test_failure(self):
|
||||
msg = (
|
||||
'1 != 2 : 1 queries executed, 2 expected\nCaptured queries were:\n'
|
||||
'1.'
|
||||
'1 != 2 : 1 queries executed, 2 expected\nCaptured queries were:\n1.'
|
||||
)
|
||||
with self.assertRaisesMessage(AssertionError, msg):
|
||||
with self.assertNumQueries(2):
|
||||
@@ -927,11 +926,7 @@ class HTMLEqualTests(SimpleTestCase):
|
||||
parse_html('</p>')
|
||||
|
||||
def test_escaped_html_errors(self):
|
||||
msg = (
|
||||
'<p>\n<foo>\n</p>'
|
||||
' != '
|
||||
'<p>\n<foo>\n</p>\n'
|
||||
)
|
||||
msg = '<p>\n<foo>\n</p> != <p>\n<foo>\n</p>\n'
|
||||
with self.assertRaisesMessage(AssertionError, msg):
|
||||
self.assertHTMLEqual('<p><foo></p>', '<p><foo></p>')
|
||||
with self.assertRaisesMessage(AssertionError, msg):
|
||||
|
||||
Reference in New Issue
Block a user