diff --git a/tests/laborious/activities/test_gates.py b/tests/laborious/activities/test_gates.py index e1ba49d..2032cc6 100644 --- a/tests/laborious/activities/test_gates.py +++ b/tests/laborious/activities/test_gates.py @@ -344,7 +344,6 @@ async def test_format_prediction(gates_activity): assert result['prediction_confidence'] == {0: 0.9} assert result['prediction_status'] == {0: 'Good'} assert result['comments'] == {0: ""} - gates_activity.debug.assert_called() @mark.asyncio @@ -393,7 +392,8 @@ async def test_get_last_timestamp_with_data(gates_activity): async def test_get_last_timestamp_no_data(gates_activity): # Arrange input_data = { - 'data': {} + 'data': {}, + **metadata } # Act diff --git a/tests/laborious/utils/repository/test_opc_repository.py b/tests/laborious/utils/repository/test_opc_repository.py index 768458e..cf9b493 100644 --- a/tests/laborious/utils/repository/test_opc_repository.py +++ b/tests/laborious/utils/repository/test_opc_repository.py @@ -139,8 +139,9 @@ def test_disconnect_error(opc_repository, mock_client): mock_client.disconnect.side_effect = Exception("Test error") opc_repository.disconnect() - opc_repository.logger.error.assert_called_once_with( - "Failed to disconnect from OPC server: Test error" + opc_repository.logger.custom_error.assert_called_once_with( + "Failed to disconnect from OPC server: Test error", + ANY ) assert opc_repository.client is None @@ -163,9 +164,9 @@ def test_validate_connection_error_count_disconnect_error(opc_repository): assert response == opc_repository.connect.return_value opc_repository.disconnect.assert_called_once() opc_repository.connect.assert_called_once() - opc_repository.logger.error.assert_has_calls( + opc_repository.logger.custom_error.assert_has_calls( [ - call("Failed to disconnect from OPC server: Test error"), + call("Failed to disconnect from OPC server: Test error", ANY), ] )