MCPcopy Create free account
hub / github.com/Exorust/Adkit-MCP / TestTopicsSemantics

Class TestTopicsSemantics

tests/test_match_semantics.py:17–28  ·  view source on GitHub ↗

Topics: ad.topics intersects request.topics (ANY).

Source from the content-addressed store, hash-verified

15
16
17class TestTopicsSemantics:
18 """Topics: ad.topics intersects request.topics (ANY)."""
19
20 def test_topics_intersection_any(self):
21 # Rule: ad passes iff at least one topic in common
22 request_topics = ["python", "ai"]
23 ad_topics_intersects = ["python", "other"] # "python" in common -> pass
24 ad_topics_no_intersect = ["java", "c++"] # no common -> fail
25 assert set(ad_topics_intersects) & set(request_topics) == {"python"}
26 assert set(ad_topics_no_intersect) & set(request_topics) == set()
27 # Lock the rule constant
28 assert "ANY" in RULE_TOPICS_INTERSECT
29
30
31class TestVerticalsSemantics:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected