Locale match + global fallback (any_of [X, '']).
| 15 | |
| 16 | |
| 17 | class 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 | |
| 33 | class TestTargetingEngineTopicsVerticals: |
nothing calls this directly
no outgoing calls
no test coverage detected