From 749357d6ae0760684599469db0e410da0b78202b Mon Sep 17 00:00:00 2001 From: Rubel Date: Mon, 28 Oct 2024 12:15:11 +0100 Subject: [PATCH] Test design. --- src/pynxtools/testing/nomad_test_units.py | 46 +++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/pynxtools/testing/nomad_test_units.py diff --git a/src/pynxtools/testing/nomad_test_units.py b/src/pynxtools/testing/nomad_test_units.py new file mode 100644 index 000000000..3f2d527c5 --- /dev/null +++ b/src/pynxtools/testing/nomad_test_units.py @@ -0,0 +1,46 @@ +import pytest + + +@pytest.fixture(scope="function") +def create_upload_id(): + """Create upload id for test purpose.""" + ... + + +@pytest.fixture(scope="function") +def add_raw_files_to_test_upload(): + """Include test files to the upload dir.""" + ... + + +def test_upload_files(): + """Test if files are included in upload folder.""" + ... + + +def test_run_processing_on_schema(): + """Run the processing function on schema file (schema.archive.yaml).""" + ... + + +def test_nxs_file_is_generated(): + """Check if nexus file has been created.""" + ... + + +def test_parse_nxs_file(): + """Parse nexus file.""" + ... + + +def test_metainfo_generation_from_nexus_file(): + """Check if metainfo has been generated from nexus file properly. + TODO: Ensure if this part parsing metadata in elastic search. Usually + this automatically include data curation in elastic search service. + """ + ... + + +def test_upload_in_properly_deleted(): + """Delete the upload after finishing the test.""" + ...