()
| 20 | |
| 21 | |
| 22 | def 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 | |
| 40 | def test_q_compound_or(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…