cic-cli/tests/test_proof.py
2021-10-11 08:57:03 +02:00

41 lines
935 B
Python

# standard imports
import os
import unittest
import logging
# local imports
from cic import Proof
from cic.attachment import Attachment
# test imports
from tests.base_cic import test_data_dir
logging.basicConfig(level=logging.DEBUG)
logg = logging.getLogger()
foo_hash = '2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae'
bar_hash = 'fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9'
class TestProof(unittest.TestCase):
def test_proof_serialize(self):
proof_path = os.path.join(test_data_dir, 'proof')
c = Proof(path=proof_path)
v = c.get()
logg.debug('v {}'.format(v))
def test_proof_serialize_merge(self):
proof_path = os.path.join(test_data_dir, 'proof')
attach = Attachment(proof_path)
attach.load()
c = Proof(path=proof_path, attachments=attach)
v = c.get()
if __name__ == '__main__':
unittest.main()