diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test_hydrilla_builder.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/test_hydrilla_builder.py b/src/test/test_hydrilla_builder.py index 605dc31..0b6244f 100644 --- a/src/test/test_hydrilla_builder.py +++ b/src/test/test_hydrilla_builder.py @@ -148,14 +148,17 @@ class CaseSettings: 'definitions': [{ 'type': 'resource', 'identifier': 'helloapple', + 'long_name': 'Hello Apple', 'version': [2021, 11, 10], }, { 'type': 'resource', 'identifier': 'hello-message', + 'long_name': 'Hello Message', 'version': [2021, 11, 10], }, { 'type': 'mapping', 'identifier': 'helloapple', + 'long_name': 'Hello Apple', 'version': [2021, 11, 10], }] } @@ -346,6 +349,9 @@ def test_build(tmpdir, prepare_source_example): with open(subdir / '2021.11.10', 'rt') as file_handle: assert json.load(file_handle) == resource_json + hydrilla_util.validator_for('api_resource_description-1.schema.json')\ + .validate(resource_json) + # Verify files under 'mapping/' mapping_dir = dstdir / 'mapping' assert ['helloapple'] == [path.name for path in mapping_dir.iterdir()] @@ -356,6 +362,9 @@ def test_build(tmpdir, prepare_source_example): with open(subdir / '2021.11.10', 'rt') as file_handle: assert json.load(file_handle) == settings.expected_mapping + hydrilla_util.validator_for('api_mapping_description-1.schema.json')\ + .validate(settings.expected_mapping) + # Verify files under 'source/' source_dir = dstdir / 'source' assert {'hello.json', 'hello.zip'} == \ @@ -377,6 +386,9 @@ def test_build(tmpdir, prepare_source_example): with open(source_dir / 'hello.json', 'rt') as file_handle: assert json.load(file_handle) == settings.expected_source_description + hydrilla_util.validator_for('api_source_description-1.schema.json')\ + .validate(settings.expected_source_description) + def modify_index_missing_file(dummy: CaseSettings, obj: dict) -> None: """ Modify index.json to expect missing report.spdx file and cause an error. |