summaryrefslogtreecommitdiff
path: root/tests/lookup
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2022-02-04 08:08:27 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-02-07 20:37:05 +0100
commit7119f40c9881666b6f9b5cf7df09ee1d21cc8344 (patch)
treefa50869f5614295f462d9bf77fec59365c621609 /tests/lookup
parent9c19aff7c7561e3a82978a272ecdaad40dda5c00 (diff)
downloaddjango-7119f40c9881666b6f9b5cf7df09ee1d21cc8344.tar.gz
Refs #33476 -- Refactored code to strictly match 88 characters line length.
Diffstat (limited to 'tests/lookup')
-rw-r--r--tests/lookup/tests.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/lookup/tests.py b/tests/lookup/tests.py
index acaf36d516..9f2e9d4b46 100644
--- a/tests/lookup/tests.py
+++ b/tests/lookup/tests.py
@@ -793,9 +793,9 @@ class LookupTests(TestCase):
Tag.objects.filter(articles__foo="bar")
def test_regex(self):
- # Create some articles with a bit more interesting headlines for testing field lookups:
- for a in Article.objects.all():
- a.delete()
+ # Create some articles with a bit more interesting headlines for
+ # testing field lookups.
+ Article.objects.all().delete()
now = datetime.now()
Article.objects.bulk_create(
[
@@ -976,7 +976,10 @@ class LookupTests(TestCase):
"""
A lookup query containing non-fields raises the proper exception.
"""
- msg = "Unsupported lookup 'blahblah' for CharField or join on the field not permitted."
+ msg = (
+ "Unsupported lookup 'blahblah' for CharField or join on the field not "
+ "permitted."
+ )
with self.assertRaisesMessage(FieldError, msg):
Article.objects.filter(headline__blahblah=99)
with self.assertRaisesMessage(FieldError, msg):