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

Class TestTargetingEngineLocale

tests/test_targeting_engine.py:17–30  ·  view source on GitHub ↗

Locale match + global fallback (any_of [X, '']).

Source from the content-addressed store, hash-verified

15
16
17class TestTargetingEngineLocale:
18 """Locale match + global fallback (any_of [X, ''])."""
19
20 def test_locale_includes_global_fallback(self):
21 vf = _build_filter(locale="en-US")
22 locale_filters = [f for f in vf.must if f.field == "locale"]
23 assert len(locale_filters) == 1
24 assert locale_filters[0].op == FilterOp.any_of
25 assert set(locale_filters[0].value) == {"en-US", ""}
26
27 def test_no_locale_constraint_means_no_locale_filter(self):
28 vf = _build_filter()
29 locale_filters = [f for f in vf.must if f.field == "locale"]
30 assert len(locale_filters) == 0
31
32
33class TestTargetingEngineTopicsVerticals:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected