Sort proofs

This commit is contained in:
nolash
2021-10-10 21:30:18 +02:00
parent fee303cf85
commit a5cdcb3900
7 changed files with 93 additions and 34 deletions

View File

@@ -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()