improve date handling
This commit is contained in:
@ -185,25 +185,14 @@ def test_combining_groups_together():
|
||||
)
|
||||
|
||||
|
||||
# @pytest.mark.asyncio
|
||||
# async def test_filtering_by_field_access():
|
||||
# async with database:
|
||||
# async with database.transaction(force_rollback=True):
|
||||
# category = await Category(name='Toys').save()
|
||||
# product1 = await Product(name="G.I Joe",
|
||||
# rating=4.7,
|
||||
# category=category).save()
|
||||
# product2 = await Product(name="My Little Pony",
|
||||
# rating=3.8,
|
||||
# category=category).save()
|
||||
#
|
||||
# check = Product.object.get(Product.name == "My Little Pony")
|
||||
# assert check == product2
|
||||
@pytest.mark.asyncio
|
||||
async def test_filtering_by_field_access():
|
||||
async with database:
|
||||
async with database.transaction(force_rollback=True):
|
||||
category = await Category(name="Toys").save()
|
||||
product2 = await Product(
|
||||
name="My Little Pony", rating=3.8, category=category
|
||||
).save()
|
||||
|
||||
# TODO: Finish implementation
|
||||
# * overload operators and add missing functions that return FilterAction (V)
|
||||
# * return OrderAction for desc() and asc() (V)
|
||||
# * create filter groups for & and | (and ~ - NOT?) (V)
|
||||
# * accept args in all functions that accept filters? or only filter and exclude? (V)
|
||||
# all functions: delete, first, get, get_or_none, get_or_create, all, filter, exclude
|
||||
# * accept OrderActions in order_by (V)
|
||||
check = await Product.objects.get(Product.name == "My Little Pony")
|
||||
assert check == product2
|
||||
|
||||
Reference in New Issue
Block a user