import pytest from nova_plan.toy_contracts import toy_local_problem_contract, sign_toy_contract from nova_plan.contracts import SignerStore def test_toy_contract_seed_and_signing(): # Register a simple signer key for MVP provenance SignerStore.register("tester", "secret-key-123") # Create toy contract and ensure it's registered in the CaC registry contract = toy_local_problem_contract() assert contract.contract_id == "toy-lp" # Sign the toy contract and ensure a signature is produced signed = sign_toy_contract("tester") assert signed is not None assert hasattr(signed, "signature") assert signed.signature is not None