| 110 | |
| 111 | |
| 112 | def 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 | |
| 132 | def test_output_hashlock_serialization(): |