@@ -179,7 +179,7 @@ def test_5src_signoff_phase_no_agent():
179179
180180def test_5src_signoff_phase_no_instrument ():
181181 """
182- Test a Five Safes Crate where the Sign-Off phase has no instrument.
182+ Test a Five Safes Crate where the Sign-Off phase has no TRE policy ( instrument) .
183183 """
184184 sparql = (
185185 SPARQL_PREFIXES
@@ -201,7 +201,71 @@ def test_5src_signoff_phase_no_instrument():
201201 expected_validation_result = False ,
202202 expected_triggered_requirements = ["SignOffPhaseProperties" ],
203203 expected_triggered_issues = [
204- "The Sign-Off Phase SHOULD have an instrument"
204+ "The Sign-Off Phase SHOULD have an TRE policy (instrument) with type CreativeWork and human-readable name"
205+ ],
206+ profile_identifier = "five-safes-crate" ,
207+ rocrate_entity_mod_sparql = sparql ,
208+ )
209+
210+
211+ def test_5src_signoff_phase_instrument_no_type ():
212+ """
213+ Test a Five Safes Crate where the Sign-Off phase instrument has no type.
214+ """
215+ sparql = (
216+ SPARQL_PREFIXES
217+ + """
218+ DELETE {
219+ ?instrument rdf:type ?type .
220+ }
221+ WHERE {
222+ ?signoff a schema:AssessAction ;
223+ schema:additionalType <https://w3id.org/shp#SignOff> ;
224+ schema:instrument ?instrument .
225+ ?instrument rdf:type ?type .
226+ }
227+ """
228+ )
229+
230+ do_entity_test (
231+ rocrate_path = ValidROC ().five_safes_crate_result ,
232+ requirement_severity = Severity .RECOMMENDED ,
233+ expected_validation_result = False ,
234+ expected_triggered_requirements = ["SignOffPhaseProperties" ],
235+ expected_triggered_issues = [
236+ "The Sign-Off Phase SHOULD have an TRE policy (instrument) with type CreativeWork and human-readable name"
237+ ],
238+ profile_identifier = "five-safes-crate" ,
239+ rocrate_entity_mod_sparql = sparql ,
240+ )
241+
242+
243+ def test_5src_signoff_phase_instrument_no_name ():
244+ """
245+ Test a Five Safes Crate where the Sign-Off phase instrument has no type.
246+ """
247+ sparql = (
248+ SPARQL_PREFIXES
249+ + """
250+ DELETE {
251+ ?instrument schema:name ?name .
252+ }
253+ WHERE {
254+ ?signoff a schema:AssessAction ;
255+ schema:additionalType <https://w3id.org/shp#SignOff> ;
256+ schema:instrument ?instrument .
257+ ?instrument schema:name ?name .
258+ }
259+ """
260+ )
261+
262+ do_entity_test (
263+ rocrate_path = ValidROC ().five_safes_crate_result ,
264+ requirement_severity = Severity .RECOMMENDED ,
265+ expected_validation_result = False ,
266+ expected_triggered_requirements = ["SignOffPhaseProperties" ],
267+ expected_triggered_issues = [
268+ "The Sign-Off Phase SHOULD have an TRE policy (instrument) with type CreativeWork and human-readable name"
205269 ],
206270 profile_identifier = "five-safes-crate" ,
207271 rocrate_entity_mod_sparql = sparql ,
0 commit comments