Skip to content

Commit

Permalink
support pipetteId arg for LoadPipetteRequest.
Browse files Browse the repository at this point in the history
  • Loading branch information
amit lissack committed May 4, 2021
1 parent fa2e28e commit cdc22c1
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ stages:
data: &create_pipette_data
pipetteName: p300_single
mount: right
pipetteId: null
response:
status_code: 200
json:
Expand All @@ -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}"
Expand Down
9 changes: 6 additions & 3 deletions robot-server/tests/service/session/models/test_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,17 @@ def test_not_empty():
"command": "equipment.loadPipette",
"data": {
"pipetteName": "p10_single",
"mount": "left"
"mount": "left",
"pipetteId": None,
}
}
})
assert request.data.command == \
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)
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit cdc22c1

Please sign in to comment.