def test_send_claim_def_fails_if_ref_is_seqno_of_non_schema_txn( be, do, poolNodesStarted, trusteeCli): be(trusteeCli) do('send SCHEMA name=Degree version=1.1' ' keys=undergrad,last_name,first_name,birth_date,postgrad,expiry_date', expect=SCHEMA_ADDED, within=5) schemaTxnSeqNo = getSeqNoFromCliOutput(trusteeCli) do('send CLAIM_DEF ref={ref} signature_type=CL', expect=CLAIM_DEF_ADDED, mapper={'ref': schemaTxnSeqNo}, within=239) firstClaimDefSeqNo = getSeqNoFromCliOutput(trusteeCli) do('send CLAIM_DEF ref={ref} signature_type=CL', expect='Schema with seqNo {ref} not found', mapper={'ref': firstClaimDefSeqNo}, within=5)
def test_send_claim_def_succeeds(be, do, poolNodesStarted, trusteeCli): be(trusteeCli) do( 'send SCHEMA name=Degree version=1.0' ' keys=undergrad,last_name,first_name,birth_date,postgrad,expiry_date', expect=SCHEMA_ADDED, within=5) schemaTxnSeqNo = getSeqNoFromCliOutput(trusteeCli) do('send CLAIM_DEF ref={ref} signature_type=CL', expect=CLAIM_DEF_ADDED, mapper={'ref': schemaTxnSeqNo}, within=239)
def test_send_claim_def_succeeds( be, do, poolNodesStarted, trusteeCli): be(trusteeCli) do('send SCHEMA name=Degree version=1.0' ' keys=undergrad,last_name,first_name,birth_date,postgrad,expiry_date', expect=SCHEMA_ADDED, within=5) schemaTxnSeqNo = getSeqNoFromCliOutput(trusteeCli) do('send CLAIM_DEF ref={ref} signature_type=CL', expect=CLAIM_DEF_ADDED, mapper={'ref': schemaTxnSeqNo}, within=239)
def testSendClaimDefFailsIfRefIsNotExistingSeqNo(be, do, poolNodesStarted, trusteeCli): be(trusteeCli) do( 'send SCHEMA name=Degree version=1.0' ' keys=undergrad,last_name,first_name,birth_date,postgrad,expiry_date', expect=SCHEMA_ADDED, within=5) schemaTxnSeqNo = getSeqNoFromCliOutput(trusteeCli) do('send CLAIM_DEF ref={ref} signature_type=CL', expect='Schema with seqNo {ref} not found', mapper={'ref': schemaTxnSeqNo + 1}, within=5)
def test_update_claim_def_for_same_schema_and_signature_type( be, do, trusteeCli): be(trusteeCli) do('send SCHEMA name=Degree version=1.3' ' keys=undergrad,last_name,first_name,birth_date,postgrad,expiry_date', expect=SCHEMA_ADDED, within=5) schemaTxnSeqNo = getSeqNoFromCliOutput(trusteeCli) do('send CLAIM_DEF ref={ref} signature_type=CL', expect=CLAIM_DEF_ADDED, mapper={'ref': schemaTxnSeqNo}, within=239) do('send CLAIM_DEF ref={ref} signature_type=CL', expect=CLAIM_DEF_ADDED, mapper={'ref': schemaTxnSeqNo}, within=239)