File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -434,11 +434,13 @@ def test_cannot_start_a_plan_without_an_instrument_session(runner: CliRunner):
434434 assert "Error: Missing option '-i' / '--instrument-session'.\n " in result .stderr
435435
436436
437+ @patch ("blueapi.client.rest.BlueapiRestClient.update_worker_task" )
437438@patch ("blueapi.client.rest.BlueapiRestClient.create_task" )
438439def test_can_pass_an_instrument_session_with_an_environment_variable (
439- mock_create_task : Mock , runner : CliRunner
440+ mock_create_task : Mock , mock_update_worker_task : Mock , runner : CliRunner
440441):
441442 mock_create_task .return_value = TaskResponse (task_id = "foo" )
443+ mock_update_worker_task .return_value = TaskResponse (task_id = "foo" )
442444 with patch .dict (
443445 os .environ ,
444446 {"BLUEAPI_CONTROLLER_RUN_INSTRUMENT_SESSION" : "cm12345-1" },
@@ -455,7 +457,7 @@ def test_can_pass_an_instrument_session_with_an_environment_variable(
455457 '{"time": 5.0}' ,
456458 ],
457459 )
458- assert result .exit_code == 0
460+ assert result .exit_code == 0 , result . output
459461 mock_create_task .assert_called_once_with (
460462 TaskRequest (
461463 name = "sleep" ,
You can’t perform that action at this time.
0 commit comments