(db, intfields_data)
| 173 | |
| 174 | @pytest.mark.asyncio |
| 175 | async def test_distinct(db, intfields_data): |
| 176 | # Test distinct |
| 177 | await IntFields.filter(intnum__gte=70).update(intnum_null=80) |
| 178 | await IntFields.filter(intnum_null__isnull=True).update(intnum_null=-1) |
| 179 | |
| 180 | assert await IntFields.all().order_by("intnum_null").distinct().values_list( |
| 181 | "intnum_null", flat=True |
| 182 | ) == [-1, 80] |
| 183 | |
| 184 | assert await IntFields.all().order_by("intnum_null").distinct().values("intnum_null") == [ |
| 185 | {"intnum_null": -1}, |
| 186 | {"intnum_null": 80}, |
| 187 | ] |
| 188 | |
| 189 | |
| 190 | @pytest.mark.asyncio |
nothing calls this directly
no test coverage detected
searching dependent graphs…