Draft 0.11.0 (#594)
* fix for #584 * fix for #580 * fix typing * connect to db in test * refactor test * remove async mark * connect client * fix mypy * fix mypy * update deps * check py3.10? * remove py3.6, bump version
This commit is contained in:
@ -176,14 +176,15 @@ async def test_queryset_method():
|
||||
year=1930, title="Book 3"
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_count_method():
|
||||
async with database:
|
||||
await sample_data()
|
||||
|
||||
count = await Author.objects.select_related("books").count()
|
||||
count = await Author.objects.select_related("books").count()
|
||||
assert count == 1
|
||||
|
||||
# The legacy functionality
|
||||
count = await Author.objects.select_related("books").count(distinct=False)
|
||||
count = await Author.objects.select_related("books").count(distinct=False)
|
||||
assert count == 3
|
||||
|
||||
Reference in New Issue
Block a user