mirror of
https://github.com/planetmint/planetmint.git
synced 2025-11-25 15:05:49 +00:00
fixed some command test cases
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
This commit is contained in:
parent
d070557639
commit
af13a3a6f6
@ -156,12 +156,13 @@ def run_election_new_upsert_validator(args, planet):
|
||||
:return: election_id or `False` in case of failure
|
||||
"""
|
||||
|
||||
new_validator = {
|
||||
# TODO: check if this change reflects assets correctly
|
||||
new_validator = [{
|
||||
'public_key': {'value': public_key_from_base64(args.public_key),
|
||||
'type': 'ed25519-base16'},
|
||||
'power': args.power,
|
||||
'node_id': args.node_id
|
||||
}
|
||||
}]
|
||||
|
||||
return create_new_election(args.sk, planet, ValidatorElection, new_validator)
|
||||
|
||||
|
||||
@ -239,7 +239,7 @@ class Election(Transaction):
|
||||
planet.store_election(self.id, height, is_concluded)
|
||||
|
||||
def show_election(self, planet):
|
||||
data = self.asset['data']
|
||||
data = self.assets[0]['data']
|
||||
if 'public_key' in data.keys():
|
||||
data['public_key'] = public_key_to_base64(data['public_key']['value'])
|
||||
response = ''
|
||||
|
||||
@ -265,12 +265,12 @@ def test_run_recover(b, alice, bob):
|
||||
|
||||
tx1 = Create.generate([alice.public_key],
|
||||
[([alice.public_key], 1)],
|
||||
assets={'cycle': 'hero'},
|
||||
assets=[{'cycle': 'hero'}],
|
||||
metadata={'name': 'hohenheim'}) \
|
||||
.sign([alice.private_key])
|
||||
tx2 = Create.generate([bob.public_key],
|
||||
[([bob.public_key], 1)],
|
||||
assets={'cycle': 'hero'},
|
||||
assets=[{'cycle': 'hero'}],
|
||||
metadata={'name': 'hohenheim'}) \
|
||||
.sign([bob.private_key])
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user