eu-digital-green-certificates/dcc-quality-assurance

CI Script: Check if Issuer Country is set

SchulzeStTSI opened this issue · 3 comments

Please insert a checkup function which checks if the issuing country is correctly set and follows iso standard.

@SchulzeStTSI I assume issuing country is cbor claim key1?

@chrloch please note 315ea30

@mkubicek-dtc Yes CBOR Claim Key one. It should be set to the right ISO code matching to the uploading folder. the field "co" within the certificate should be just a valid iso code, because this country can be a different one as the issuing country.

Implemented, but if merged, will fail 4 DCCs:

FAILED tests/test_qrqualitycheck.py::test_country_in_path_matches_issuer[P:\cwa\dcc-quality-assurance\EL\1.0.0\REC.png] - AssertionError: assert 'EL' == 'GR'
FAILED tests/test_qrqualitycheck.py::test_country_in_path_matches_issuer[P:\cwa\dcc-quality-assurance\EL\1.0.0\TEST.png] - AssertionError: assert 'EL' == 'GR'
FAILED tests/test_qrqualitycheck.py::test_country_in_path_matches_issuer[P:\cwa\dcc-quality-assurance\EL\1.0.0\VAC.png] - AssertionError: assert 'EL' == 'GR'
FAILED tests/test_qrqualitycheck.py::test_country_in_path_matches_issuer[P:\cwa\dcc-quality-assurance\FR\1.3.0\VAC.png] - AssertionError: assert 'FR' == 'CNAM'
FAILED tests/test_qrqualitycheck.py::test_country_code_formats[P:\cwa\dcc-quality-assurance\FR\1.3.0\VAC.png] - ValueError: Invalid country code: CNAM