1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Refs #33476 -- Reformatted code with Black.

This commit is contained in:
django-bot
2022-02-03 20:24:19 +01:00
committed by Mariusz Felisiak
parent f68fa8b45d
commit 9c19aff7c7
1992 changed files with 139577 additions and 96284 deletions

View File

@@ -10,7 +10,7 @@ class ContainsTests(TestCase):
cls.proxy_category = ProxyCategory.objects.create()
def test_unsaved_obj(self):
msg = 'QuerySet.contains() cannot be used on unsaved objects.'
msg = "QuerySet.contains() cannot be used on unsaved objects."
with self.assertRaisesMessage(ValueError, msg):
DumbCategory.objects.contains(DumbCategory())
@@ -20,11 +20,11 @@ class ContainsTests(TestCase):
DumbCategory.objects.contains(object())
def test_values(self):
msg = 'Cannot call QuerySet.contains() after .values() or .values_list().'
msg = "Cannot call QuerySet.contains() after .values() or .values_list()."
with self.assertRaisesMessage(TypeError, msg):
DumbCategory.objects.values_list('pk').contains(self.category)
DumbCategory.objects.values_list("pk").contains(self.category)
with self.assertRaisesMessage(TypeError, msg):
DumbCategory.objects.values('pk').contains(self.category)
DumbCategory.objects.values("pk").contains(self.category)
def test_basic(self):
with self.assertNumQueries(1):
@@ -53,7 +53,7 @@ class ContainsTests(TestCase):
def test_wrong_model(self):
qs = DumbCategory.objects.all()
named_category = NamedCategory(name='category')
named_category = NamedCategory(name="category")
with self.assertNumQueries(0):
self.assertIs(qs.contains(named_category), False)
# Evaluate the queryset.