2727
2828def test_completed_createaction_does_not_have_result ():
2929 """
30- Test a Five Safes Crate where `CreateAction` has `CompleteActionStatus ` but
30+ Test a Five Safes Crate where `CreateAction` has `CompletedActionStatus ` but
3131 does not have the property `result`.
32- (We remove `result` from `CreateAction` if this has `CompleteActionStatus `)
32+ (We remove `result` from `CreateAction` if this has `CompletedActionStatus `)
3333 """
3434 sparql = (
3535 SPARQL_PREFIXES
@@ -39,16 +39,20 @@ def test_completed_createaction_does_not_have_result():
3939 }
4040 WHERE {
4141 ?action a schema:CreateAction ;
42- schema:actionStatus "http://schema.org/CompleteActionStatus" . }
42+ schema:actionStatus "http://schema.org/CompletedActionStatus" ;
43+ schema:result ?o
44+ }
4345 """
4446 )
4547
4648 do_entity_test (
47- rocrate_path = ValidROC ().five_safes_crate_request ,
49+ rocrate_path = ValidROC ().five_safes_crate_result ,
4850 requirement_severity = Severity .RECOMMENDED ,
4951 expected_validation_result = False ,
50- expected_triggered_requirements = None ,
51- expected_triggered_issues = None ,
52+ expected_triggered_requirements = ["CreateAction" ],
53+ expected_triggered_issues = [
54+ "`CreateAction` with CompletedActionStatus SHOULD have the `schema:result` property."
55+ ],
5256 profile_identifier = "five-safes-crate" ,
5357 rocrate_entity_mod_sparql = sparql ,
5458 )
@@ -77,11 +81,13 @@ def test_result_output_does_not_have_allowed_type():
7781 )
7882
7983 do_entity_test (
80- rocrate_path = ValidROC ().five_safes_crate_request ,
84+ rocrate_path = ValidROC ().five_safes_crate_result ,
8185 requirement_severity = Severity .RECOMMENDED ,
8286 expected_validation_result = False ,
83- expected_triggered_requirements = None ,
84- expected_triggered_issues = None ,
87+ expected_triggered_requirements = ["Output" ],
88+ expected_triggered_issues = [
89+ "Result SHOULD have a `@type` among an allowed set of values."
90+ ],
8591 profile_identifier = "five-safes-crate" ,
8692 rocrate_entity_mod_sparql = sparql ,
8793 )
0 commit comments