Skip to content

Commit

Permalink
test.adapter.xml.xml_deserialization: make OperationVariable tests …
Browse files Browse the repository at this point in the history
…more explicit
  • Loading branch information
jkhsjdhjs authored and s-heppner committed Nov 14, 2023
1 parent 4c98ba0 commit 662ccf6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/adapter/xml/test_xml_deserialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def test_operation_variable_no_submodel_element(self) -> None:
</aas:submodel>
</aas:submodels>
""")
self._assertInExceptionAndLog(xml, "aas:value", KeyError, logging.ERROR)
self._assertInExceptionAndLog(xml, ["aas:value", "has no submodel element"], KeyError, logging.ERROR)

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

def test_duplicate_identifier(self) -> None:
xml = _xml_wrap("""
Expand Down

0 comments on commit 662ccf6

Please sign in to comment.