Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/typing/find.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from beanie.operators import And, Nor, Or
from tests.typing.models import ProjectionTest, Test


Expand Down Expand Up @@ -29,3 +30,9 @@ async def find_one() -> Test | None:

async def find_one_with_projection() -> ProjectionTest | None:
return await Test.find_one().project(projection_model=ProjectionTest)


def logical_operators_accept_document_field_comparisons() -> None:
Or(Test.foo == "foo", Test.bar == "bar")
And(Test.foo == "foo", Test.bar == "bar")
Nor(Test.foo == "foo", Test.bar == "bar")
Loading