Add separate generic task for proof verification

This commit is contained in:
nolash
2021-10-08 20:19:15 +02:00
parent df21db958b
commit 7e2857d1e7
4 changed files with 126 additions and 39 deletions

View File

@@ -36,17 +36,19 @@ def test_tokens(
init_database,
init_celery_tasks,
custodial_roles,
foo_token_declaration,
bar_token_declaration,
celery_worker,
):
api = Api(str(default_chain_spec), queue=None)
t = api.token('FOO')
t = api.token('FOO', proof=foo_token_declaration)
r = t.get_leaf()
assert len(r) == 1
assert r[0]['address'] == foo_token
t = api.tokens(['BAR', 'FOO'])
t = api.tokens(['BAR', 'FOO'], proof=[[foo_token_declaration], [bar_token_declaration]])
r = t.get_leaf()
assert len(r) == 2
assert r[1]['address'] == foo_token