MCPcopy
hub / github.com/bigchaindb/bigchaindb / test_output_deserialization

Function test_output_deserialization

tests/common/test_transaction.py:112–129  ·  view source on GitHub ↗
(user_Ed25519, user_pub)

Source from the content-addressed store, hash-verified

110
111
112def test_output_deserialization(user_Ed25519, user_pub):
113 from bigchaindb.common.transaction import Output
114
115 expected = Output(user_Ed25519, [user_pub], 1)
116 cond = {
117 'condition': {
118 'uri': user_Ed25519.condition_uri,
119 'details': {
120 'type': 'ed25519-sha-256',
121 'public_key': b58encode(user_Ed25519.public_key).decode(),
122 },
123 },
124 'public_keys': [user_pub],
125 'amount': '1',
126 }
127 cond = Output.from_dict(cond)
128
129 assert cond == expected
130
131
132def test_output_hashlock_serialization():

Callers

nothing calls this directly

Calls 2

OutputClass · 0.90
from_dictMethod · 0.45

Tested by

no test coverage detected