Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
GernotMaier committed Nov 15, 2023
1 parent 68b107b commit 108e93f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
4 changes: 2 additions & 2 deletions tests/integration_tests/test_applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,8 +709,8 @@
"TESTOUTPUTDIR/",
],
],
# validate_schema_files
"validate_schema_files": [
# validate_file_using_schema
"validate_file_using_schema": [
[
"--schema",
"TESTMODELDIR/jsonschema.yml",
Expand Down
10 changes: 2 additions & 8 deletions tests/unit_tests/data_model/test_metadata_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,7 @@ def test_fill_top_level_meta_from_file(args_dict_site):
metadata_1._fill_top_level_meta_from_file(metadata_1.top_level_meta["cta"])

assert metadata_1.top_level_meta["cta"]["activity"]["name"] == "mirror_2f_measurement"
assert (
metadata_1.top_level_meta["cta"]["context"]["sim"]["association"][0]["type"] == "FlashCam"
)
assert (
metadata_1.top_level_meta["cta"]["context"]["sim"]["document"][1]["type"] == "Presentation"
)
assert metadata_1.top_level_meta["cta"]["context"]["document"][1]["type"] == "Presentation"


def test_fill_product_meta(args_dict_site):
Expand Down Expand Up @@ -84,7 +79,7 @@ def test_fill_product_meta(args_dict_site):
metadata_1.args_dict["schema"] = "tests/resources/MST_mirror_2f_measurements.schema.yml"
metadata_1._fill_product_meta(product_dict=metadata_1.top_level_meta["cta"]["product"])

assert metadata_1.top_level_meta["cta"]["product"]["data"]["model"]["version"] == "0.1.0"
assert metadata_1.top_level_meta["cta"]["product"]["data"]["model"]["version"] == "1.0.0"


def test_fill_association_id(args_dict_site):
Expand All @@ -109,7 +104,6 @@ def test_fill_association_id(args_dict_site):
== "North-MST-NectarCam-7"
)

metadata_1.top_level_meta["cta"]["context"]["sim"]["association"][1]["site"] = "West"
metadata_1._fill_association_id(
metadata_1.top_level_meta["cta"]["context"]["sim"]["association"]
)
Expand Down

0 comments on commit 108e93f

Please sign in to comment.