feat: update discover() for pattern caps, match_fn, rt_filter gating
Registry changes from dict[str,Capability] to dict[str,list[Capability]]. discover() gains pattern_caps parameter (fallback for unmatched hrefs) and gates each candidate on rt_filter and match_fn before binding. Duplicate hrefs in registry allowed only if all caps set a discriminator.
This commit is contained in:
1 parent
211fcd1324
commit
b10cfad194
7 files changed
+176
-32
No files matched your search
@@ -3,9 +3,10 @@ from samsung_appliance.registry.registry import CAPABILITIES
|
||||
|
||||
|
||||
def test_registry_is_keyed_by_href():
|
||||
"""Registry keys should match capability hrefs."""
|
||||
for href, cap in CAPABILITIES.items():
|
||||
assert cap.href == href
|
||||
"""Registry keys should match capability hrefs for all caps in the group."""
|
||||
for href, caps in CAPABILITIES.items():
|
||||
for cap in caps:
|
||||
assert cap.href == href
|
||||
|
||||
|
||||
def test_registry_has_no_duplicate_href():
|
||||
|
||||
Reference in new issue
Block a user