Topics/verticals: any_of (intersection ANY).
| 31 | |
| 32 | |
| 33 | class TestTargetingEngineTopicsVerticals: |
| 34 | """Topics/verticals: any_of (intersection ANY).""" |
| 35 | |
| 36 | def test_topics_adds_any_of_filter(self): |
| 37 | vf = _build_filter(topics=["python", "ai"]) |
| 38 | topic_filters = [f for f in vf.must if f.field == "topics"] |
| 39 | assert len(topic_filters) == 1 |
| 40 | assert topic_filters[0].op == FilterOp.any_of |
| 41 | assert topic_filters[0].value == ["python", "ai"] |
| 42 | |
| 43 | def test_verticals_adds_any_of_filter(self): |
| 44 | vf = _build_filter(verticals=["tech", "education"]) |
| 45 | vert_filters = [f for f in vf.must if f.field == "verticals"] |
| 46 | assert len(vert_filters) == 1 |
| 47 | assert vert_filters[0].op == FilterOp.any_of |
| 48 | assert vert_filters[0].value == ["tech", "education"] |
| 49 | |
| 50 | |
| 51 | class TestTargetingEngineExclusions: |
nothing calls this directly
no outgoing calls
no test coverage detected