Skip to content

Commit

Permalink
fixed validation test
Browse files Browse the repository at this point in the history
  • Loading branch information
sanni-t committed Jan 2, 2025
1 parent 279a913 commit bdfe17b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions api/tests/opentrons/protocol_api/test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -830,15 +830,17 @@ def test_ensure_valid_flat_wells_list(decoy: Decoy) -> None:
) == [target1, target1, target2, target2]


def test_ensure_valid_tip_drop_location_for_transfer_v2(
def test_ensure_valid_trash_location_for_transfer_v2(
decoy: Decoy,
) -> None:
"""It should check that the tip drop location is valid."""
"""It should check that the trash location is valid."""
mock_well = decoy.mock(cls=Well)
mock_location = Location(point=Point(x=1, y=1, z=1), labware=mock_well)
mock_trash_bin = decoy.mock(cls=TrashBin)
mock_waste_chute = decoy.mock(cls=WasteChute)
assert subject.ensure_valid_trash_location_for_transfer_v2(mock_well) == mock_well
assert subject.ensure_valid_trash_location_for_transfer_v2(mock_well) == Location(
Point(0, 0, 0), labware=mock_well
)
assert (
subject.ensure_valid_trash_location_for_transfer_v2(mock_location)
== mock_location
Expand All @@ -853,8 +855,8 @@ def test_ensure_valid_tip_drop_location_for_transfer_v2(
)


def test_ensure_valid_tip_drop_location_for_transfer_v2_raises(decoy: Decoy) -> None:
"""It should raise an error for invalid tip drop locations."""
def test_ensure_valid_trash_location_for_transfer_v2_raises(decoy: Decoy) -> None:
"""It should raise an error for invalid trash locations."""
with pytest.raises(TypeError, match="However, it is '\\['a'\\]'"):
subject.ensure_valid_trash_location_for_transfer_v2(
["a"] # type: ignore[arg-type]
Expand Down

0 comments on commit bdfe17b

Please sign in to comment.