Skip to content

Commit 83f31d9

Browse files
committed
remove redundant asserts
1 parent b898209 commit 83f31d9

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

tests/model_fields_/test_embedded_model.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,22 +254,18 @@ def test_exists_subquery(self):
254254
author__name=OuterRef("author__name"), author__address__city="Boston"
255255
)
256256
queryset = Book.objects.filter(Exists(subquery)).order_by("name")
257-
self.assertEqual(queryset.count(), 3)
258257
self.assertQuerySetEqual(queryset, ["Book 2", "Book 3", "Book 4"], lambda book: book.name)
259258

260259
def test_in_subquery(self):
261260
subquery = Book.objects.filter(author__age__gt=35).values("author__name")
262261
queryset = Book.objects.filter(author__name__in=subquery).order_by("name")
263-
self.assertEqual(queryset.count(), 3)
264262
self.assertQuerySetEqual(queryset, ["Book 2", "Book 3", "Book 4"], lambda book: book.name)
265263

266264
def test_exists_with_foreign_object(self):
267265
subquery = Library.objects.filter(best_seller=OuterRef("name"))
268266
queryset = Book.objects.filter(Exists(subquery))
269-
self.assertEqual(queryset.count(), 1)
270267
self.assertEqual(queryset.first().name, "Book 1")
271268

272269
def test_foreign_field_with_ranges(self):
273270
queryset = Library.objects.filter(books__author__age__range=(25, 35))
274-
self.assertEqual(queryset.count(), 1)
275271
self.assertEqual(queryset.first().name, "Central Library")

0 commit comments

Comments
 (0)