Skip to content

Commit

Permalink
Update command tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
SyntaxColoring committed Oct 24, 2024
1 parent a3c0c35 commit db850fa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
6 changes: 6 additions & 0 deletions api/tests/opentrons/protocol_engine/commands/test_drop_tip.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,4 +294,10 @@ async def test_tip_attached_error(
new_deck_point=DeckPoint(x=111, y=222, z=333),
),
),
state_update_if_false_positive=update_types.StateUpdate(
pipette_tip_state=update_types.PipetteTipStateUpdate(
pipette_id="abc",
tip_geometry=None,
)
),
)
10 changes: 8 additions & 2 deletions api/tests/opentrons/protocol_engine/commands/test_pick_up_tip.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from datetime import datetime

from decoy import Decoy, matchers
from unittest.mock import sentinel

from opentrons.types import MountType, Point

Expand All @@ -11,7 +12,7 @@
WellOffset,
DeckPoint,
)
from opentrons.protocol_engine.errors import TipNotAttachedError
from opentrons.protocol_engine.errors import PickUpTipTipNotAttachedError
from opentrons.protocol_engine.execution import MovementHandler, TipHandler
from opentrons.protocol_engine.resources import ModelUtils
from opentrons.protocol_engine.state import update_types
Expand Down Expand Up @@ -140,7 +141,7 @@ async def test_tip_physically_missing_error(
await tip_handler.pick_up_tip(
pipette_id=pipette_id, labware_id=labware_id, well_name=well_name
)
).then_raise(TipNotAttachedError())
).then_raise(PickUpTipTipNotAttachedError(tip_geometry=sentinel.tip_geometry))
decoy.when(model_utils.generate_id()).then_return(error_id)
decoy.when(model_utils.get_timestamp()).then_return(error_created_at)

Expand All @@ -164,4 +165,9 @@ async def test_tip_physically_missing_error(
pipette_id="pipette-id", labware_id="labware-id", well_name="well-name"
),
),
state_update_if_false_positive=update_types.StateUpdate(
pipette_tip_state=update_types.PipetteTipStateUpdate(
pipette_id="pipette-id", tip_geometry=sentinel.tip_geometry
)
),
)

0 comments on commit db850fa

Please sign in to comment.