MCPcopy Index your code
hub / github.com/tortoise/tortoise-orm / test_q_compound

Function test_q_compound

tests/test_q.py:22–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20
21
22def test_q_compound():
23 q1 = Q(moo="cow")
24 q2 = Q(moo="bull")
25 q = Q(q1, q2, join_type=Q.OR)
26
27 assert q1.children == ()
28 assert q1.filters == {"moo": "cow"}
29 assert q1.join_type == "AND"
30
31 assert q2.children == ()
32 assert q2.filters == {"moo": "bull"}
33 assert q2.join_type == "AND"
34
35 assert q.children == (q1, q2)
36 assert q.filters == {}
37 assert q.join_type == "OR"
38
39
40def test_q_compound_or():

Callers

nothing calls this directly

Calls 1

QClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…