Sort proofs
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# standard imports
|
||||
import unittest
|
||||
import logging
|
||||
# standard imports import unittestimport logging
|
||||
import random
|
||||
import os
|
||||
import logging
|
||||
|
||||
# external imports
|
||||
from chainlib.chain import ChainSpec
|
||||
@@ -14,6 +14,11 @@ from funga.eth.keystore.dict import DictKeystore
|
||||
|
||||
# local imports
|
||||
from cic.ext.eth import CICEth
|
||||
from cic import Proof
|
||||
from cic.attachment import Attachment
|
||||
|
||||
# test imports
|
||||
from tests.base_cic import test_data_dir
|
||||
|
||||
logg = logging.getLogger(__name__)
|
||||
|
||||
@@ -40,6 +45,8 @@ class TestCICEthBase(EthTesterCase):
|
||||
'key_address': addresses[2],
|
||||
},
|
||||
}
|
||||
self.proofs = []
|
||||
for i in range(3):
|
||||
self.proofs.append(random.randbytes(32).hex())
|
||||
proof_dir = os.path.join(test_data_dir, 'proof')
|
||||
attach = Attachment(path=proof_dir)
|
||||
attach.load()
|
||||
self.proofs = Proof(proof_dir, attachments=attach)
|
||||
self.proofs.load()
|
||||
|
||||
5
tests/testdata/proof/proof.json
vendored
Normal file
5
tests/testdata/proof/proof.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"version": 0,
|
||||
"namespace": "ge",
|
||||
"description": "foo bar baz"
|
||||
}
|
||||
Reference in New Issue
Block a user