Skip to content

Commit abe8792

Browse files
author
Kolea Plesco
committed
Validation Summary Report
1 parent a5318b3 commit abe8792

2 files changed

Lines changed: 41 additions & 4 deletions

File tree

tests/unit/core/model/test_notice_rdf_validation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ def test_set_notice_rdf_validation(publicly_available_notice, indexed_notice):
2222
publicly_available_notice.set_rdf_validation(rdf_validation=shacl_validation)
2323

2424
publicly_available_notice.set_distilled_rdf_validation(rdf_validation=shacl_validation)
25-
assert publicly_available_notice.status is NoticeStatus.VALIDATED
26-
assert publicly_available_notice.mets_manifestation is None
25+
# assert publicly_available_notice.status is NoticeStatus.VALIDATED
26+
# assert publicly_available_notice.mets_manifestation is None
2727

2828
assert indexed_notice.get_distilled_rdf_validation() is None
2929
assert indexed_notice.get_rdf_validation() is None
@@ -40,8 +40,8 @@ def test_set_notice_distilled_rdf_validation(publicly_available_notice, indexed_
4040
publicly_available_notice.set_distilled_rdf_validation(rdf_validation=shacl_validation)
4141
publicly_available_notice.set_rdf_validation(rdf_validation=shacl_validation)
4242

43-
assert publicly_available_notice.status is NoticeStatus.VALIDATED
44-
assert publicly_available_notice.mets_manifestation is None
43+
# assert publicly_available_notice.status is NoticeStatus.VALIDATED
44+
# assert publicly_available_notice.mets_manifestation is None
4545

4646
with pytest.raises(ValueError):
4747
indexed_notice.set_distilled_rdf_validation(shacl_validation)
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/usr/bin/python3
2+
3+
# test_notice_rdf_validation.py
4+
# Date: 12/02/2022
5+
# Author: Eugeniu Costetchi
6+
# Email: costezki.eugen@gmail.com
7+
8+
""" """
9+
import pytest
10+
11+
from ted_sws.core.model.manifestation import XPATHCoverageValidationReport, SHACLTestSuiteValidationReport, \
12+
QueriedSHACLShapeValidationResult
13+
from ted_sws.core.model.notice import NoticeStatus
14+
15+
16+
def test_set_notice_validation(publicly_available_notice):
17+
shacl_validation = SHACLTestSuiteValidationReport(object_data="this is a shacl validation report",
18+
test_suite_identifier="shacl_test_suite_id",
19+
mapping_suite_identifier="mapping_suite_id",
20+
validation_results=QueriedSHACLShapeValidationResult())
21+
22+
publicly_available_notice.set_rdf_validation(rdf_validation=shacl_validation)
23+
publicly_available_notice.set_distilled_rdf_validation(rdf_validation=shacl_validation)
24+
25+
xml_validation = XPATHCoverageValidationReport(
26+
object_data="",
27+
mapping_suite_identifier=""
28+
)
29+
xml_manifestation = publicly_available_notice.xml_manifestation
30+
xml_manifestation.add_validation(xml_validation)
31+
assert publicly_available_notice.xml_manifestation.xpath_coverage_validation
32+
33+
publicly_available_notice.set_xml_validation(xml_validation)
34+
35+
assert publicly_available_notice.status is NoticeStatus.VALIDATED
36+
assert publicly_available_notice.mets_manifestation is None
37+

0 commit comments

Comments
 (0)