mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +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:
parent
c9d6e3595c
commit
c5cd878382
53 changed files with 227 additions and 217 deletions
|
@ -987,8 +987,7 @@ class AliasTests(TestCase):
|
|||
|
||||
def test_aggregate_alias(self):
|
||||
msg = (
|
||||
"Cannot aggregate over the 'other_age' alias. Use annotate() to "
|
||||
"promote it."
|
||||
"Cannot aggregate over the 'other_age' alias. Use annotate() to promote it."
|
||||
)
|
||||
with self.assertRaisesMessage(FieldError, msg):
|
||||
Author.objects.alias(
|
||||
|
@ -1012,10 +1011,7 @@ class AliasTests(TestCase):
|
|||
|
||||
def test_values_alias(self):
|
||||
qs = Book.objects.alias(rating_alias=F('rating') - 1)
|
||||
msg = (
|
||||
"Cannot select the 'rating_alias' alias. Use annotate() to "
|
||||
"promote it."
|
||||
)
|
||||
msg = "Cannot select the 'rating_alias' alias. Use annotate() to promote it."
|
||||
for operation in ['values', 'values_list']:
|
||||
with self.subTest(operation=operation):
|
||||
with self.assertRaisesMessage(FieldError, msg):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue