Fixed relative paths after refactoring schemas into submodule

This commit is contained in:
Daniel Armengod 2024-02-01 22:12:50 +01:00
parent 43375f3ee7
commit c25038aff3
1 changed files with 9 additions and 9 deletions

18
main.py
View File

@ -77,11 +77,11 @@ def did_web_issue_vc_and_check_revocation(vc_name, revoked=True):
did_issuer = "did:web:idhub.pangea.org:did-registry:allRevoked" if revoked else "did:web:idhub.pangea.org:did-registry:noneRevoked"
did_subject = didkit.key_to_did("key", jwk_subject)
vc_template = json.load(open(f'../../schemas/vc_templates/{vc_name}.json'))
data_base = json.load(open(f'../../schemas/vc_examples/base--data.json'))
vc_template = json.load(open(f'schemas/vc_templates/{vc_name}.json'))
data_base = json.load(open(f'schemas/vc_examples/base--data.json'))
data_base["issuer"]["id"] = did_issuer
data_base["credentialSubject"]["id"] = did_subject
data_specific = json.load(open(f'../../schemas/vc_examples/{vc_name}--data.json'))
data_specific = json.load(open(f'schemas/vc_examples/{vc_name}--data.json'))
data = deep_merge_dict(data_base, data_specific)
vc_rendered_unsigned = deep_merge_dict(vc_template, data)
@ -102,11 +102,11 @@ def did_web_issue_vc_test_newstyle(vc_name):
did_issuer = "did:web:idhub.pangea.org"
did_subject = didkit.key_to_did("key", jwk_subject)
vc_template = json.load(open(f'../../schemas/vc_templates/{vc_name}.json'))
data_base = json.load(open(f'../../schemas/vc_examples/base--data.json'))
vc_template = json.load(open(f'schemas/vc_templates/{vc_name}.json'))
data_base = json.load(open(f'schemas/vc_examples/base--data.json'))
data_base["issuer"]["id"] = did_issuer
data_base["credentialSubject"]["id"] = did_subject
data_specific = json.load(open(f'../../schemas/vc_examples/{vc_name}--data.json'))
data_specific = json.load(open(f'schemas/vc_examples/{vc_name}--data.json'))
data = deep_merge_dict(data_base, data_specific)
vc_rendered_unsigned = deep_merge_dict(vc_template, data)
@ -124,11 +124,11 @@ def issue_vc_test_newstyle(vc_name):
did_issuer = didkit.key_to_did("key", jwk_issuer)
did_subject = didkit.key_to_did("key", jwk_subject)
vc_template = json.load(open(f'../../schemas/vc_templates/{vc_name}.json'))
data_base = json.load(open(f'../../schemas/vc_examples/base--data.json'))
vc_template = json.load(open(f'schemas/vc_templates/{vc_name}.json'))
data_base = json.load(open(f'schemas/vc_examples/base--data.json'))
data_base["issuer"]["id"] = did_issuer
data_base["credentialSubject"]["id"] = did_subject
data_specific = json.load(open(f'../../schemas/vc_examples/{vc_name}--data.json'))
data_specific = json.load(open(f'schemas/vc_examples/{vc_name}--data.json'))
data = deep_merge_dict(data_base, data_specific)
vc_rendered_unsigned = deep_merge_dict(vc_template, data)