Skip to content

Commit 4601e94

Browse files
committed
test for actionStatus for SignOff phase
1 parent 2aa359d commit 4601e94

2 files changed

Lines changed: 38 additions & 0 deletions

File tree

rocrate_validator/profiles/five-safes-crate/should/4_sign_off.ttl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,13 @@ five-safes-crate:SignOffPhaseProperties
8282
sh:minCount 1 ;
8383
sh:severity sh:Warning ;
8484
sh:message "The Sign-Off Phase SHOULD have an endTime" ;
85+
] ;
86+
sh:property [
87+
sh:description "Check if the Sign Off phase has an actionStatus" ;
88+
sh:path schema:actionStatus ;
89+
sh:minCount 1 ;
90+
sh:severity sh:Warning ;
91+
sh:message "The Sign-Off Phase SHOULD have an actionStatus" ;
8592
] .
8693

8794

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

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,34 @@ def test_5src_signoff_phase_no_endtime():
113113
profile_identifier="five-safes-crate",
114114
rocrate_entity_mod_sparql=sparql,
115115
)
116+
117+
118+
def test_5src_signoff_phase_no_actionstatus():
119+
"""
120+
Test a Five Safes Crate where the Sign-Off phase has no actionStatus.
121+
"""
122+
sparql = (
123+
SPARQL_PREFIXES
124+
+ """
125+
DELETE {
126+
?signoff schema:actionStatus ?actionStatus .
127+
}
128+
WHERE {
129+
?signoff a schema:AssessAction ;
130+
schema:additionalType <https://w3id.org/shp#SignOff> ;
131+
schema:actionStatus ?actionStatus .
132+
}
133+
"""
134+
)
135+
136+
do_entity_test(
137+
rocrate_path=ValidROC().five_safes_crate_result,
138+
requirement_severity=Severity.RECOMMENDED,
139+
expected_validation_result=False,
140+
expected_triggered_requirements=["SignOffPhaseProperties"],
141+
expected_triggered_issues=[
142+
"The Sign-Off Phase SHOULD have an actionStatus"
143+
],
144+
profile_identifier="five-safes-crate",
145+
rocrate_entity_mod_sparql=sparql,
146+
)

0 commit comments

Comments
 (0)