From aec5839b5e3a0115fbd42918e54124794b2d518b Mon Sep 17 00:00:00 2001 From: vitor-aignosi Date: Fri, 24 Oct 2025 10:59:48 -0300 Subject: [PATCH] SIENTIAPDE-1314 Refactor OPC Write Test to Separate Output Data and Metrics - Updated the test for the OPC write operation to separately assert output data and OPC metrics for improved clarity and accuracy in testing. - Changed the variable names to reflect the new structure of the returned values from the write operation. --- tests/laborious/activities/test_opc.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/laborious/activities/test_opc.py b/tests/laborious/activities/test_opc.py index 669f82b..76afed5 100644 --- a/tests/laborious/activities/test_opc.py +++ b/tests/laborious/activities/test_opc.py @@ -276,13 +276,11 @@ async def test_write_opc_data_success(mock_dataframe, opc): opc.manage_output_tags = AsyncMock(return_value=(True, {'tag1': 0.1, 'tag2': 0.2})) opc.process_confidence = MagicMock(return_value={'data': 'data'}) - output = await opc.write_opc_data(input_data) + output_data, opc_metrics = await opc.write_opc_data(input_data) # Assert - assert output == { - 'data': {'data': 'data'}, - 'metrics': {'server1': {'tag1': 0.1, 'tag2': 0.2}}, - } + assert output_data == {'data': 'data'} + assert opc_metrics == {'server1': {'tag1': 0.1, 'tag2': 0.2}} opc.manage_output_tags.assert_called_once_with( 'server1', input_data['opc_output_config']['server1'],