diff --git a/robot-server/tests/integration/sessions/test_live_protocol.tavern.yaml b/robot-server/tests/integration/sessions/test_live_protocol.tavern.yaml index 555d0c1ddfb..d1160b03ec8 100644 --- a/robot-server/tests/integration/sessions/test_live_protocol.tavern.yaml +++ b/robot-server/tests/integration/sessions/test_live_protocol.tavern.yaml @@ -86,6 +86,7 @@ stages: data: &create_pipette_data pipetteName: p300_single mount: right + pipetteId: null response: status_code: 200 json: @@ -100,6 +101,31 @@ stages: completedAt: !anystr result: pipetteId: !anystr + - name: Load pipette command specifying the id + request: + url: "{host:s}:{port:d}/sessions/{session_id}/commands/execute" + method: POST + json: + data: + command: equipment.loadPipette + data: &create_pipette_data_with_id + pipetteName: p10_single + mount: left + pipetteId: my pipette + response: + status_code: 200 + json: + links: !anydict + data: + id: !anystr + data: *create_pipette_data_with_id + command: equipment.loadPipette + status: executed + createdAt: !anystr + startedAt: !anystr + completedAt: !anystr + result: + pipetteId: my pipette - name: Delete the session request: url: "{host:s}:{port:d}/sessions/{session_id}" diff --git a/robot-server/tests/service/session/models/test_command.py b/robot-server/tests/service/session/models/test_command.py index 04d5ce613cc..a42f2467179 100644 --- a/robot-server/tests/service/session/models/test_command.py +++ b/robot-server/tests/service/session/models/test_command.py @@ -53,7 +53,8 @@ def test_not_empty(): "command": "equipment.loadPipette", "data": { "pipetteName": "p10_single", - "mount": "left" + "mount": "left", + "pipetteId": None, } } }) @@ -61,7 +62,8 @@ def test_not_empty(): command_definitions.EquipmentCommand.load_pipette assert request.data.data == pe_commands.LoadPipetteRequest( pipetteName="p10_single", - mount=MountType.LEFT + mount=MountType.LEFT, + pipetteId=None, ) dt = datetime(2000, 1, 1) @@ -81,7 +83,8 @@ def test_not_empty(): command_definitions.EquipmentCommand.load_pipette assert response.data == pe_commands.LoadPipetteRequest( pipetteName="p10_single", - mount=MountType.LEFT + mount=MountType.LEFT, + pipetteId=None, ) assert response.id == "id" assert response.createdAt == dt diff --git a/robot-server/tests/service/session/session_types/live_protocol/test_command_executor.py b/robot-server/tests/service/session/session_types/live_protocol/test_command_executor.py index 9773d0fabee..1a968c28956 100644 --- a/robot-server/tests/service/session/session_types/live_protocol/test_command_executor.py +++ b/robot-server/tests/service/session/session_types/live_protocol/test_command_executor.py @@ -136,6 +136,7 @@ async def test_load_instrument(command_executor, mock_protocol_engine): request_body = pe_commands.LoadPipetteRequest( pipetteName="p10_single", mount=MountType.LEFT, + pipetteId=None, ) protocol_engine_response = pe_commands.CompletedCommand(