diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-03 11:20:46 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-03 11:38:46 +0100 |
| commit | d55a1e5809b424907528af42bfdfc2991ef11651 (patch) | |
| tree | 605247aa8b905c148d6e5f480da3f0d2a2eec586 /tests/annotations | |
| parent | 76c80d96f3828a5a3f66842932a5624674ba99a2 (diff) | |
[4.0.x] 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],
)
Backport of c5cd8783825b5f6384417dac5f3889b4210b7d08 from main.
Diffstat (limited to 'tests/annotations')
| -rw-r--r-- | tests/annotations/tests.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/annotations/tests.py b/tests/annotations/tests.py index 62912ee99c..37ca569389 100644 --- a/tests/annotations/tests.py +++ b/tests/annotations/tests.py @@ -967,8 +967,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( @@ -992,10 +991,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): |
