13 lines
387 B
Python
13 lines
387 B
Python
import json
|
|
from crisisguard.registry import GraphOfContracts
|
|
|
|
|
|
def test_registry_register_and_retrieve():
|
|
g = GraphOfContracts()
|
|
g.register_adapter("AdapterA", "0.1.0", {"capability": "test"})
|
|
a = g.get_adapter("AdapterA")
|
|
assert a is not None
|
|
assert a.name == "AdapterA"
|
|
assert a.version == "0.1.0"
|
|
assert g.get_contract("AdapterA")["capability"] == "test"
|