Skip to content

Commit 308f526

Browse files
committed
test fixing, because why not
1 parent 3c50c50 commit 308f526

11 files changed

Lines changed: 123417 additions & 1 deletion

File tree

ted_sws/notice_transformer/adapters/rml_mapper.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ def execute(self, package_path: Path) -> str:
8888
bash_script = f"cd {package_path} && java -jar {self.rml_mapper_path} -m {package_path / TRANSFORM_PACKAGE_NAME / MAPPINGS_PACKAGE_NAME / '*'} -s {self.get_serialization_format_value()}"
8989
script_result = subprocess.run(bash_script, shell=True, capture_output=True)
9090
error = script_result.stderr.decode('utf-8')
91+
print(error)
9192
if error:
9293
raise Exception(error)
9394
return script_result.stdout.decode('utf-8')

tests/e2e/notice_transformer/test_rml_mapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
def test_rml_mapper(rml_test_package_path):
99
rml_mapper = RMLMapper(rml_mapper_path=config.RML_MAPPER_PATH, serialization_format=DEFAULT_SERIALIZATION_FORMAT)
1010
rdf_result = rml_mapper.execute(package_path=rml_test_package_path)
11-
assert rdf_result == RML_MAPPER_TEST_RDF_RESULT
11+
assert RML_MAPPER_TEST_RDF_RESULT in rdf_result
1212

1313
serialization_format = SerializationFormat.TURTLE
1414
rml_mapper.set_serialization_format(serialization_format)

tests/test_data/notice_transformer/test_repository/test_package/data/source.xml

Lines changed: 515 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
xmlElement,code,conceptURI
2+
MINISTRY,OP_DATPRO,http://publications.europa.eu/resource/authority/buyer-legal-type/OP_DATPRO
3+
BODY_PUBLIC,body-pl,http://publications.europa.eu/resource/authority/buyer-legal-type/body-pl
4+
,body-pl-cga,http://publications.europa.eu/resource/authority/buyer-legal-type/body-pl-cga
5+
,body-pl-la,http://publications.europa.eu/resource/authority/buyer-legal-type/body-pl-la
6+
REGIONAL_AGENCY,body-pl-ra,http://publications.europa.eu/resource/authority/buyer-legal-type/body-pl-ra
7+
NATIONAL_AGENCY,cga,http://publications.europa.eu/resource/authority/buyer-legal-type/cga
8+
,def-cont,http://publications.europa.eu/resource/authority/buyer-legal-type/def-cont
9+
EU_INSTITUTION,eu-ins-bod-ag,http://publications.europa.eu/resource/authority/buyer-legal-type/eu-ins-bod-ag
10+
,int-org,http://publications.europa.eu/resource/authority/buyer-legal-type/int-org
11+
,la,http://publications.europa.eu/resource/authority/buyer-legal-type/la
12+
,org-sub,http://publications.europa.eu/resource/authority/buyer-legal-type/org-sub
13+
,org-sub-cga,http://publications.europa.eu/resource/authority/buyer-legal-type/org-sub-cga
14+
,org-sub-la,http://publications.europa.eu/resource/authority/buyer-legal-type/org-sub-la
15+
,org-sub-ra,http://publications.europa.eu/resource/authority/buyer-legal-type/org-sub-ra
16+
,pub-undert,http://publications.europa.eu/resource/authority/buyer-legal-type/pub-undert
17+
,pub-undert-cga,http://publications.europa.eu/resource/authority/buyer-legal-type/pub-undert-cga
18+
,pub-undert-la,http://publications.europa.eu/resource/authority/buyer-legal-type/pub-undert-la
19+
,pub-undert-ra,http://publications.europa.eu/resource/authority/buyer-legal-type/pub-undert-ra
20+
REGIONAL_AUTHORITY,ra,http://publications.europa.eu/resource/authority/buyer-legal-type/ra
21+
,spec-rights-entity,http://publications.europa.eu/resource/authority/buyer-legal-type/spec-rights-entity
22+
,eu-int-org,http://publications.europa.eu/resource/authority/buyer-legal-type/eu-int-org
23+
,rl-aut,http://publications.europa.eu/resource/authority/buyer-legal-type/rl-aut
24+
,grp-p-aut,http://publications.europa.eu/resource/authority/buyer-legal-type/grp-p-aut
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"head": {
3+
"link": [],
4+
"vars": [
5+
"code",
6+
"conceptURI"
7+
]
8+
},
9+
"results": {
10+
"distinct": false,
11+
"ordered": true,
12+
"bindings": [
13+
{
14+
"code": {
15+
"type": "literal",
16+
"value": "OP_DATPRO"
17+
},
18+
"conceptURI": {
19+
"type": "uri",
20+
"value": "http://publications.europa.eu/resource/authority/contract-nature/OP_DATPRO"
21+
}
22+
},
23+
{
24+
"code": {
25+
"type": "literal",
26+
"value": "services"
27+
},
28+
"conceptURI": {
29+
"type": "uri",
30+
"value": "http://publications.europa.eu/resource/authority/contract-nature/services"
31+
}
32+
},
33+
{
34+
"code": {
35+
"type": "literal",
36+
"value": "supplies"
37+
},
38+
"conceptURI": {
39+
"type": "uri",
40+
"value": "http://publications.europa.eu/resource/authority/contract-nature/supplies"
41+
}
42+
},
43+
{
44+
"code": {
45+
"type": "literal",
46+
"value": "works"
47+
},
48+
"conceptURI": {
49+
"type": "uri",
50+
"value": "http://publications.europa.eu/resource/authority/contract-nature/works"
51+
}
52+
},
53+
{
54+
"code": {
55+
"type": "literal",
56+
"value": "combined"
57+
},
58+
"conceptURI": {
59+
"type": "uri",
60+
"value": "http://publications.europa.eu/resource/authority/contract-nature/combined"
61+
}
62+
}
63+
]
64+
}
65+
}

0 commit comments

Comments
 (0)