|
| 1 | +# Copyright (c) 2024-2025 CRS4 |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +import logging |
| 16 | + |
| 17 | +from rocrate_validator.models import Severity |
| 18 | +from tests.conftest import SKIP_LOCAL_DATA_ENTITY_EXISTENCE_CHECK_IDENTIFIER |
| 19 | +from tests.ro_crates import ValidROC |
| 20 | +from tests.shared import do_entity_test |
| 21 | + |
| 22 | +logger = logging.getLogger(__name__) |
| 23 | +logger.setLevel(logging.DEBUG) |
| 24 | + |
| 25 | + |
| 26 | +def test_valid_five_safes_crate_request_required(): |
| 27 | + """Test a valid Workflow Run Crate.""" |
| 28 | + do_entity_test( |
| 29 | + ValidROC().five_safes_crate_request, |
| 30 | + Severity.REQUIRED, |
| 31 | + True, |
| 32 | + profile_identifier="five-safes-crate", |
| 33 | + skip_checks=[SKIP_LOCAL_DATA_ENTITY_EXISTENCE_CHECK_IDENTIFIER] |
| 34 | + ) |
| 35 | + |
| 36 | +def test_valid_five_safes_crate_result_required(): |
| 37 | + """Test a valid Workflow Run Crate.""" |
| 38 | + do_entity_test( |
| 39 | + ValidROC().five_safes_crate_result, |
| 40 | + Severity.REQUIRED, |
| 41 | + True, |
| 42 | + profile_identifier="five-safes-crate", |
| 43 | + skip_checks=[SKIP_LOCAL_DATA_ENTITY_EXISTENCE_CHECK_IDENTIFIER] |
| 44 | + ) |
0 commit comments