summaryrefslogtreecommitdiff
path: root/tests/custom_lookups
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2024-01-26 12:45:07 +0100
committerGitHub <noreply@github.com>2024-01-26 12:45:07 +0100
commit305757aec19c9d5111e4d76095ae0acd66163e4b (patch)
tree04aa017e66c06b3b19cb466ed4e1d73cd871523d /tests/custom_lookups
parent3f6d939c62efd967f548c27a265748cc2cc47ca5 (diff)
Applied Black's 2024 stable style.
https://github.com/psf/black/releases/tag/24.1.0
Diffstat (limited to 'tests/custom_lookups')
-rw-r--r--tests/custom_lookups/tests.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/custom_lookups/tests.py b/tests/custom_lookups/tests.py
index 8fc31d4e6b..f107c5320a 100644
--- a/tests/custom_lookups/tests.py
+++ b/tests/custom_lookups/tests.py
@@ -238,10 +238,11 @@ class LookupTests(TestCase):
def test_custom_name_lookup(self):
a1 = Author.objects.create(name="a1", birthdate=date(1981, 2, 16))
Author.objects.create(name="a2", birthdate=date(2012, 2, 29))
- with register_lookup(models.DateField, YearTransform), register_lookup(
- models.DateField, YearTransform, lookup_name="justtheyear"
- ), register_lookup(YearTransform, Exactly), register_lookup(
- YearTransform, Exactly, lookup_name="isactually"
+ with (
+ register_lookup(models.DateField, YearTransform),
+ register_lookup(models.DateField, YearTransform, lookup_name="justtheyear"),
+ register_lookup(YearTransform, Exactly),
+ register_lookup(YearTransform, Exactly, lookup_name="isactually"),
):
qs1 = Author.objects.filter(birthdate__testyear__exactly=1981)
qs2 = Author.objects.filter(birthdate__justtheyear__isactually=1981)