diff options
author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-03 11:20:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-03 11:20:46 +0100 |
commit | c5cd8783825b5f6384417dac5f3889b4210b7d08 (patch) | |
tree | 3d4689aaa0e209e40d2d8df09edad7e155960b45 /tests/annotations | |
parent | c9d6e3595cfd0aa58cde1656bd735ecfcd7a872b (diff) | |
download | django-c5cd8783825b5f6384417dac5f3889b4210b7d08.tar.gz |
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],
)
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 2c2b946835..1755a9f435 100644 --- a/tests/annotations/tests.py +++ b/tests/annotations/tests.py @@ -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): |