more tests for excluding parent fields, finished docs

This commit is contained in:
collerek
2021-06-02 10:16:47 +02:00
parent af394de483
commit f52797fb06
9 changed files with 244 additions and 15 deletions

View File

@ -68,8 +68,10 @@ async def test_is_null():
assert tolkien.books[0].year is None
assert tolkien.books[0].title == "The Hobbit"
tolkien = await Author.objects.select_related("books").paginate(1, 10).get(
books__year__isnull=True
tolkien = (
await Author.objects.select_related("books")
.paginate(1, 10)
.get(books__year__isnull=True)
)
assert len(tolkien.books) == 1
assert tolkien.books[0].year is None