Skip to content

Commit b836d7b

Browse files
authored
Revert "NO: Add test data"
1 parent 5b44585 commit b836d7b

File tree

5 files changed

+3
-30
lines changed

5 files changed

+3
-30
lines changed

NO/README.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

NO/REC.png

-66.1 KB
Binary file not shown.

NO/TEST.png

-62.7 KB
Binary file not shown.

NO/VAC.png

-64.1 KB
Binary file not shown.

tests/test_qrqualitycheck.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,10 @@
1616
# See the License for the specific language governing permissions and
1717
# limitations under the License.
1818
# ---license-end
19-
#
20-
# Dependencies:
21-
# Python 3.9
22-
# pip install -r tests/requirements.txt
23-
#
24-
# Usage:
25-
# To run all tests: pytest
26-
# To run tests for a given country: pytest -C=<Country Code> . e.g. pytest -C=AT
2719

2820
import json
2921
from base64 import b64decode
3022
import base64
31-
import os
3223
from os import path
3324
from pathlib import Path
3425
from io import BytesIO
@@ -82,6 +73,7 @@
8273
def pytest_generate_tests(metafunc):
8374
if "config_env" in metafunc.fixturenames:
8475
country_code = metafunc.config.getoption("country_code")
76+
file_name = metafunc.config.getoption("file_name")
8577
test_dir = path.dirname(path.dirname(path.abspath(__file__)))
8678
test_files = glob(
8779
str(Path(test_dir, country_code, "*", "*.png")), recursive=True)
@@ -271,8 +263,8 @@ def test_issuer_quality(config_env: Dict):
271263

272264
# If file path indicates JSON schema version, verify it against actual JSON schema version
273265
# E.g. "<countrycode>/1.0.0/VAC.png" will trigger schema version verification, whereas "<countrycode>/1.0.0/exceptions/VAC.png" will not
274-
if re.search("\\d\\.\\d\\.\\d", config_env[FILE_PATH].split(os.sep)[-2]):
275-
path_schema_version = config_env[FILE_PATH].split(os.sep)[-2]
266+
if re.search("\\d\\.\\d\\.\\d", config_env[FILE_PATH].split("/")[-2]):
267+
path_schema_version = config_env[FILE_PATH].split("/")[-2]
276268
dcc_schema_version = cose_payload[PAYLOAD_HCERT][PAYLOAD_ISSUER][VER]
277269
if path_schema_version != dcc_schema_version:
278270
fail("File path indicates {} but DCC contains {} JSON schema version".format(

0 commit comments

Comments
 (0)