@@ -221,7 +221,7 @@ def test_operation_variable_no_submodel_element(self) -> None:
221221 </aas:submodel>
222222 </aas:submodels>
223223 """ )
224- self ._assertInExceptionAndLog (xml , "aas:value" , KeyError , logging .ERROR )
224+ self ._assertInExceptionAndLog (xml , [ "aas:value" , "has no submodel element" ] , KeyError , logging .ERROR )
225225
226226 def test_operation_variable_too_many_submodel_elements (self ) -> None :
227227 # TODO: simplify this should our suggestion regarding the XML schema get accepted
@@ -256,6 +256,7 @@ def test_operation_variable_too_many_submodel_elements(self) -> None:
256256 with self .assertLogs (logging .getLogger (), level = logging .WARNING ) as context :
257257 read_aas_xml_file (io .BytesIO (xml .encode ("utf-8" )), failsafe = False )
258258 self .assertIn ("aas:value" , context .output [0 ]) # type: ignore
259+ self .assertIn ("more than one submodel element" , context .output [0 ])
259260
260261 def test_duplicate_identifier (self ) -> None :
261262 xml = _xml_wrap ("""
@@ -306,7 +307,7 @@ def get_clean_store() -> model.DictObjectStore:
306307 with self .assertLogs (logging .getLogger (), level = logging .INFO ) as log_ctx :
307308 identifiers = read_aas_xml_file_into (object_store , bytes_io , replace_existing = False , ignore_existing = True )
308309 self .assertEqual (len (identifiers ), 0 )
309- self .assertIn ("already exists in the object store" , log_ctx .output [0 ]) # type: ignore
310+ self .assertIn ("already exists in the object store" , log_ctx .output [0 ])
310311 submodel = object_store .pop ()
311312 self .assertIsInstance (submodel , model .Submodel )
312313 self .assertEqual (submodel .id_short , "test123" )
0 commit comments