Skip to content

Commit 662ccf6

Browse files
jkhsjdhjss-heppner
authored andcommitted
test.adapter.xml.xml_deserialization: make OperationVariable tests more explicit
1 parent 4c98ba0 commit 662ccf6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/adapter/xml/test_xml_deserialization.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def test_operation_variable_no_submodel_element(self) -> None:
232232
</aas:submodel>
233233
</aas:submodels>
234234
""")
235-
self._assertInExceptionAndLog(xml, "aas:value", KeyError, logging.ERROR)
235+
self._assertInExceptionAndLog(xml, ["aas:value", "has no submodel element"], KeyError, logging.ERROR)
236236

237237
def test_operation_variable_too_many_submodel_elements(self) -> None:
238238
# TODO: simplify this should our suggestion regarding the XML schema get accepted
@@ -266,6 +266,7 @@ def test_operation_variable_too_many_submodel_elements(self) -> None:
266266
with self.assertLogs(logging.getLogger(), level=logging.WARNING) as context:
267267
read_aas_xml_file(io.BytesIO(xml.encode("utf-8")), failsafe=False)
268268
self.assertIn("aas:value", context.output[0])
269+
self.assertIn("more than one submodel element", context.output[0])
269270

270271
def test_duplicate_identifier(self) -> None:
271272
xml = _xml_wrap("""

0 commit comments

Comments
 (0)