From 662ccf6ad05254e0b2965f2ff643efcd1005d2fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20M=C3=B6ller?= Date: Fri, 3 Nov 2023 16:55:14 +0100 Subject: [PATCH] test.adapter.xml.xml_deserialization: make `OperationVariable` tests more explicit --- test/adapter/xml/test_xml_deserialization.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/adapter/xml/test_xml_deserialization.py b/test/adapter/xml/test_xml_deserialization.py index 773e9848a..714dee132 100644 --- a/test/adapter/xml/test_xml_deserialization.py +++ b/test/adapter/xml/test_xml_deserialization.py @@ -232,7 +232,7 @@ def test_operation_variable_no_submodel_element(self) -> None: """) - 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 @@ -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("""