@@ -183,7 +183,39 @@ def test_5src_root_data_entity_has_publisher_but_not_license():
183183 expected_validation_result = False ,
184184 expected_triggered_requirements = ["License present on published crates" ],
185185 expected_triggered_issues = [
186- "Profile Conformance: Published crates SHOULD include a license."
186+ "A crate SHOULD include a license if and only if it has a publisher."
187+ ],
188+ profile_identifier = "five-safes-crate" ,
189+ rocrate_entity_mod_sparql = sparql ,
190+ )
191+
192+
193+ def test_5src_root_data_entity_has_license_but_not_publisher ():
194+ """
195+ Test a Five Safes Crate where the RootDataEntity has publisher but not license.
196+ """
197+ sparql = (
198+ SPARQL_PREFIXES
199+ + """
200+ DELETE {
201+ ?rootdataentity schema:publisher ?publisher .
202+ }
203+ WHERE {
204+ ?metadatafile a schema:CreativeWork ;
205+ schema:about ?rootdataentity .
206+ ?rootdataentity schema:publisher ?publisher ;
207+ schema:license ?license .
208+ }
209+ """
210+ )
211+
212+ do_entity_test (
213+ rocrate_path = ValidROC ().five_safes_crate_result ,
214+ requirement_severity = Severity .RECOMMENDED ,
215+ expected_validation_result = False ,
216+ expected_triggered_requirements = ["License present on published crates" ],
217+ expected_triggered_issues = [
218+ "A crate SHOULD include a license if and only if it has a publisher."
187219 ],
188220 profile_identifier = "five-safes-crate" ,
189221 rocrate_entity_mod_sparql = sparql ,
0 commit comments