Skip to content

Commit 3dea19c

Browse files
committed
update tests
1 parent 7588d59 commit 3dea19c

6 files changed

Lines changed: 34 additions & 35 deletions

tests/integration/profiles/five-safes-crate/test_5src_11_workflow_execution.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,10 @@ def test_5src_workflow_object_has_no_properly_formatted_start_time():
136136
rocrate_path=ValidROC().five_safes_crate_result,
137137
requirement_severity=Severity.REQUIRED,
138138
expected_validation_result=False,
139-
expected_triggered_requirements=["WorkflowExecution"],
139+
expected_triggered_requirements=["Timestamp Format"],
140140
expected_triggered_issues=[
141141
(
142-
"The startTime of the workflow execution object MUST follow the RFC 3339 standard "
142+
"All `startTime` and `endTime` values MUST follow the RFC 3339 standard "
143143
"(YYYY-MM-DD'T'hh:mm:ss[.fraction](Z | ±hh:mm))."
144144
)
145145
],
@@ -169,10 +169,10 @@ def test_5src_workflow_object_has_no_properly_formatted_end_time():
169169
rocrate_path=ValidROC().five_safes_crate_result,
170170
requirement_severity=Severity.REQUIRED,
171171
expected_validation_result=False,
172-
expected_triggered_requirements=["WorkflowExecution"],
172+
expected_triggered_requirements=["Timestamp Format"],
173173
expected_triggered_issues=[
174174
(
175-
"The endTime of the workflow execution object MUST follow the RFC 3339 standard "
175+
"All `startTime` and `endTime` values MUST follow the RFC 3339 standard "
176176
"(YYYY-MM-DD'T'hh:mm:ss[.fraction](Z | ±hh:mm))."
177177
)
178178
],

tests/integration/profiles/five-safes-crate/test_5src_12_check_phase.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ def test_5src_check_value_start_time_not_iso_standard():
108108
rocrate_path=ValidROC().five_safes_crate_result,
109109
requirement_severity=Severity.REQUIRED,
110110
expected_validation_result=False,
111-
expected_triggered_requirements=["CheckValue"],
111+
expected_triggered_requirements=["Timestamp Format"],
112112
expected_triggered_issues=[
113113
(
114-
"`CheckValue` --> `startTime` MUST follows the RFC 3339 standard "
114+
"All `startTime` and `endTime` values MUST follow the RFC 3339 standard "
115115
"(YYYY-MM-DD'T'hh:mm:ss[.fraction](Z | ±hh:mm))."
116116
)
117117
],
@@ -142,10 +142,10 @@ def test_5src_check_value_end_time_not_iso_standard():
142142
rocrate_path=ValidROC().five_safes_crate_result,
143143
requirement_severity=Severity.REQUIRED,
144144
expected_validation_result=False,
145-
expected_triggered_requirements=["CheckValue"],
145+
expected_triggered_requirements=["Timestamp Format"],
146146
expected_triggered_issues=[
147147
(
148-
"`CheckValue` --> `endTime` MUST follows the RFC 3339 standard "
148+
"All `startTime` and `endTime` values MUST follow the RFC 3339 standard "
149149
"(YYYY-MM-DD'T'hh:mm:ss[.fraction](Z | ±hh:mm))."
150150
)
151151
],

tests/integration/profiles/five-safes-crate/test_5src_13_validation_phase.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@ def test_5src_validation_check_start_time_not_iso_standard():
133133
rocrate_path=ValidROC().five_safes_crate_result,
134134
requirement_severity=Severity.REQUIRED,
135135
expected_validation_result=False,
136-
expected_triggered_requirements=["ValidationCheck"],
136+
expected_triggered_requirements=["Timestamp Format"],
137137
expected_triggered_issues=[
138138
(
139-
"ValidationCheck --> `startTime` MUST follows the RFC 3339 standard "
139+
"All `startTime` and `endTime` values MUST follow the RFC 3339 standard "
140140
"(YYYY-MM-DD'T'hh:mm:ss[.fraction](Z | ±hh:mm))."
141141
)
142142
],
@@ -166,10 +166,10 @@ def test_5src_validation_check_end_time_not_iso_standard():
166166
rocrate_path=ValidROC().five_safes_crate_result,
167167
requirement_severity=Severity.REQUIRED,
168168
expected_validation_result=False,
169-
expected_triggered_requirements=["ValidationCheck"],
169+
expected_triggered_requirements=["Timestamp Format"],
170170
expected_triggered_issues=[
171171
(
172-
"ValidationCheck --> `endTime` MUST follows the RFC 3339 standard "
172+
"All `startTime` and `endTime` values MUST follow the RFC 3339 standard "
173173
"(YYYY-MM-DD'T'hh:mm:ss[.fraction](Z | ±hh:mm))."
174174
)
175175
],

tests/integration/profiles/five-safes-crate/test_5src_14_workflow_retrieval_phase.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@ def test_5src_download_action_start_time_not_iso_standard():
102102
rocrate_path=ValidROC().five_safes_crate_result,
103103
requirement_severity=Severity.REQUIRED,
104104
expected_validation_result=False,
105-
expected_triggered_requirements=["DownloadAction"],
105+
expected_triggered_requirements=["Timestamp Format"],
106106
expected_triggered_issues=[
107107
(
108-
"`DownloadAction` --> `startTime` MUST follows the RFC 3339 standard "
108+
"All `startTime` and `endTime` values MUST follow the RFC 3339 standard "
109109
"(YYYY-MM-DD'T'hh:mm:ss[.fraction](Z | ±hh:mm))."
110110
)
111111
],
@@ -135,10 +135,10 @@ def test_5src_check_value_end_time_not_iso_standard():
135135
rocrate_path=ValidROC().five_safes_crate_result,
136136
requirement_severity=Severity.REQUIRED,
137137
expected_validation_result=False,
138-
expected_triggered_requirements=["DownloadAction"],
138+
expected_triggered_requirements=["Timestamp Format"],
139139
expected_triggered_issues=[
140140
(
141-
"`DownloadAction` --> `endTime` MUST follows the RFC 3339 standard "
141+
"All `startTime` and `endTime` values MUST follow the RFC 3339 standard "
142142
"(YYYY-MM-DD'T'hh:mm:ss[.fraction](Z | ±hh:mm))."
143143
)
144144
],
@@ -361,6 +361,7 @@ def test_5src_download_action_does_not_have_action_status_property():
361361

362362
# ----- MAY fails tests
363363

364+
364365
def test_5src_downloaded_workflow_is_not_represented_by_its_own_entity():
365366
sparql = (
366367
SPARQL_PREFIXES

tests/integration/profiles/five-safes-crate/test_5src_4_signoff_phase.py

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,7 @@ def test_5src_signoff_phase_wrong_type():
112112
requirement_severity=Severity.REQUIRED,
113113
expected_validation_result=False,
114114
expected_triggered_requirements=["SignOff"],
115-
expected_triggered_issues=[
116-
"Sign Off phase MUST be a `schema:AssessAction`."
117-
],
115+
expected_triggered_issues=["Sign Off phase MUST be a `schema:AssessAction`."],
118116
profile_identifier="five-safes-crate",
119117
rocrate_entity_mod_sparql=sparql,
120118
)
@@ -242,10 +240,12 @@ def test_5src_signoff_phase_malformed_endtime():
242240
rocrate_path=ValidROC().five_safes_crate_result,
243241
requirement_severity=Severity.RECOMMENDED,
244242
expected_validation_result=False,
245-
expected_triggered_requirements=["SignOffPhaseEndTime"],
243+
expected_triggered_requirements=["Timestamp Format"],
246244
expected_triggered_issues=[
247-
"Sign Off object SHOULD have endTime property if action completed or failed."
248-
+ " This must follow ISO-8601 syntax"
245+
(
246+
"All `startTime` and `endTime` values MUST follow the RFC 3339 standard "
247+
"(YYYY-MM-DD'T'hh:mm:ss[.fraction](Z | ±hh:mm))."
248+
)
249249
],
250250
profile_identifier="five-safes-crate",
251251
rocrate_entity_mod_sparql=sparql,
@@ -310,10 +310,12 @@ def test_5src_signoff_phase_malformed_starttime():
310310
rocrate_path=ValidROC().five_safes_crate_result,
311311
requirement_severity=Severity.OPTIONAL,
312312
expected_validation_result=False,
313-
expected_triggered_requirements=["SignOffPhaseStartTime"],
313+
expected_triggered_requirements=["Timestamp Format"],
314314
expected_triggered_issues=[
315-
"Sign Off object MAY have a startTime property if action is active, completed or failed."
316-
+ " This must follow ISO-8601 syntax"
315+
(
316+
"All `startTime` and `endTime` values MUST follow the RFC 3339 standard "
317+
"(YYYY-MM-DD'T'hh:mm:ss[.fraction](Z | ±hh:mm))."
318+
)
317319
],
318320
profile_identifier="five-safes-crate",
319321
rocrate_entity_mod_sparql=sparql,
@@ -343,9 +345,7 @@ def test_5src_signoff_phase_no_actionstatus():
343345
requirement_severity=Severity.RECOMMENDED,
344346
expected_validation_result=False,
345347
expected_triggered_requirements=["SignOffPhaseProperties"],
346-
expected_triggered_issues=[
347-
"The Sign-Off Phase SHOULD have an actionStatus"
348-
],
348+
expected_triggered_issues=["The Sign-Off Phase SHOULD have an actionStatus"],
349349
profile_identifier="five-safes-crate",
350350
rocrate_entity_mod_sparql=sparql,
351351
)
@@ -374,9 +374,7 @@ def test_5src_signoff_phase_no_agent():
374374
requirement_severity=Severity.RECOMMENDED,
375375
expected_validation_result=False,
376376
expected_triggered_requirements=["SignOffPhaseProperties"],
377-
expected_triggered_issues=[
378-
"The Sign-Off Phase SHOULD have an agent"
379-
],
377+
expected_triggered_issues=["The Sign-Off Phase SHOULD have an agent"],
380378
profile_identifier="five-safes-crate",
381379
rocrate_entity_mod_sparql=sparql,
382380
)

tests/integration/profiles/five-safes-crate/test_5src_8_disclosure_phase.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,10 @@ def test_5src_disclosure_object_has_no_properly_formatted_start_time():
199199
rocrate_path=ValidROC().five_safes_crate_result,
200200
requirement_severity=Severity.REQUIRED,
201201
expected_validation_result=False,
202-
expected_triggered_requirements=["DisclosureCheck"],
202+
expected_triggered_requirements=["Timestamp Format"],
203203
expected_triggered_issues=[
204204
(
205-
"`DisclosureCheck` --> `startTime` MUST follow the RFC 3339 standard "
205+
"All `startTime` and `endTime` values MUST follow the RFC 3339 standard "
206206
"(YYYY-MM-DD'T'hh:mm:ss[.fraction](Z | ±hh:mm))."
207207
)
208208
],
@@ -232,10 +232,10 @@ def test_5src_disclosure_object_has_no_properly_formatted_end_time():
232232
rocrate_path=ValidROC().five_safes_crate_result,
233233
requirement_severity=Severity.REQUIRED,
234234
expected_validation_result=False,
235-
expected_triggered_requirements=["DisclosureCheck"],
235+
expected_triggered_requirements=["Timestamp Format"],
236236
expected_triggered_issues=[
237237
(
238-
"`DisclosureCheck` --> `endTime` MUST follow the RFC 3339 standard "
238+
"All `startTime` and `endTime` values MUST follow the RFC 3339 standard "
239239
"(YYYY-MM-DD'T'hh:mm:ss[.fraction](Z | ±hh:mm))."
240240
)
241241
],

0 commit comments

Comments
 (0)