From 283828310666c87c62dd5c7dfc32c8c4eb3a09e5 Mon Sep 17 00:00:00 2001 From: Ryan howard Date: Fri, 9 Aug 2024 16:57:41 -0400 Subject: [PATCH] fix the tests that were returning a dict instead of a float --- .../hardware_control/test_ot3_api.py | 23 +++---------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/api/tests/opentrons/hardware_control/test_ot3_api.py b/api/tests/opentrons/hardware_control/test_ot3_api.py index 20a8f090374d..bb1352d31571 100644 --- a/api/tests/opentrons/hardware_control/test_ot3_api.py +++ b/api/tests/opentrons/hardware_control/test_ot3_api.py @@ -815,15 +815,9 @@ async def test_liquid_probe( with patch.object( hardware_backend, "liquid_probe", AsyncMock(spec=hardware_backend.liquid_probe) ) as mock_liquid_probe: - return_dict = { - head_node: 140, - NodeId.gantry_x: 0, - NodeId.gantry_y: 0, - pipette_node: 0, - } # make sure aspirate while sensing reverses direction - mock_liquid_probe.return_value = return_dict + mock_liquid_probe.return_value = 140 fake_settings_aspirate = LiquidProbeSettings( mount_speed=5, plunger_speed=20, @@ -849,8 +843,6 @@ async def test_liquid_probe( force_both_sensors=False, ) - return_dict[head_node], return_dict[pipette_node] = 142, 142 - mock_liquid_probe.return_value = return_dict await ot3_hardware.liquid_probe( mount, fake_max_z_dist, fake_liquid_settings ) # should raise no exceptions @@ -903,7 +895,7 @@ async def test_liquid_probe_plunger_moves( PipetteLiquidNotFoundError, PipetteLiquidNotFoundError, PipetteLiquidNotFoundError, - None, + 140, ] fake_max_z_dist = 75.0 @@ -1056,16 +1048,10 @@ async def test_multi_liquid_probe( with patch.object( hardware_backend, "liquid_probe", AsyncMock(spec=hardware_backend.liquid_probe) ) as mock_liquid_probe: - return_dict = { - NodeId.head_l: 140, - NodeId.gantry_x: 0, - NodeId.gantry_y: 0, - NodeId.pipette_left: 0, - } side_effects = [ PipetteLiquidNotFoundError(), PipetteLiquidNotFoundError(), - return_dict, + 140, ] # make sure aspirate while sensing reverses direction @@ -1103,9 +1089,6 @@ async def test_multi_liquid_probe( ) assert mock_liquid_probe.call_count == 3 - return_dict[NodeId.head_l], return_dict[NodeId.pipette_left] = 142, 142 - mock_liquid_probe.return_value = return_dict - async def test_liquid_not_found( ot3_hardware: ThreadManager[OT3API],