def test_combinator_or(self): qa = Q(a=1) qb = Q(b=1) qc = Q(c=1) # Simple OR ands = search._apply_combinator('OR', [qa, qb, qc]) self.assertEqual(self.destructure_query_set(ands), self.destructure_query_set(qa | qb | qc))
def test_combinator_or(self): qa = Q(a=1) qb = Q(b=1) qc = Q(c=1) # Simple OR ands = search._apply_combinator('OR', [qa, qb, qc]) self.assertEqual(self.destructure_query_set(ands), self.destructure_query_set(qa | qb | qc))
def test_combinator_and(self): qa = Q(a=1) qb = Q(b=1) qc = Q(c=1) # Simple AND ands = search._apply_combinator('AND', [qa, qb, qc]) self.assertEqual(self.destructure_query_set(ands), self.destructure_query_set(qa & qb & qc))
def test_combinator_and(self): qa = Q(a=1) qb = Q(b=1) qc = Q(c=1) # Simple AND ands = search._apply_combinator('AND', [qa, qb, qc]) self.assertEqual(self.destructure_query_set(ands), self.destructure_query_set(qa & qb & qc))