16 lines
497 B
Python
16 lines
497 B
Python
from deltaforge.go_c_registry import GoCRegistry, GoCContract
|
|
|
|
|
|
def test_goc_registry_basic_operations():
|
|
reg = GoCRegistry()
|
|
contract = GoCContract(contract_id="goC-1", version="v0.1", description="initial MVP contract")
|
|
cid = reg.register_contract(contract)
|
|
assert cid == "goC-1"
|
|
|
|
fetched = reg.get_contract("goC-1")
|
|
assert isinstance(fetched, GoCContract)
|
|
assert fetched.version == "v0.1"
|
|
|
|
all_contracts = reg.list_contracts()
|
|
assert len(all_contracts) == 1
|