diff --git a/api/tests/opentrons/protocol_runner/test_run_orchestrator_provider.py b/api/tests/opentrons/protocol_runner/test_run_orchestrator_provider.py index 84937633302..38b402d1308 100644 --- a/api/tests/opentrons/protocol_runner/test_run_orchestrator_provider.py +++ b/api/tests/opentrons/protocol_runner/test_run_orchestrator_provider.py @@ -66,12 +66,27 @@ def mock_hardware_api(decoy: Decoy) -> HardwareAPI: return decoy.mock(cls=HardwareAPI) +@pytest.fixture +def config(decoy: Decoy) -> HardwareAPI: + """Get a mocked out HardwareAPI dependency.""" + return JsonProtocolConfig(schema_version=7) + + +@pytest.mark.parametrize( + "config", + [ + (PythonProtocolConfig(api_version=APIVersion.from_string("2.14"))), + JsonProtocolConfig(schema_version=7), + ], +) @pytest.fixture def subject( - mock_protocol_engine: ProtocolEngine, mock_hardware_api: HardwareAPI + mock_protocol_engine: ProtocolEngine, + mock_hardware_api: HardwareAPI, + config: Union[JsonProtocolConfig, PythonProtocolConfig], ) -> RunOrchestrator: return RunOrchestrator.build_orchestrator( - protocol_engine=mock_protocol_engine, hardware_api=mock_hardware_api + protocol_engine=mock_protocol_engine, hardware_api=mock_hardware_api, protocol_config=config ) @@ -126,20 +141,18 @@ def test_build_run_orchestrator_provider( @pytest.mark.parametrize( - "runner, command_intent, input_protocol_config", + "runner, command_intent", [ - (lazy_fixture("mock_setup_runner"), pe_commands.CommandIntent.SETUP, None), - (lazy_fixture("mock_fixit_runner"), pe_commands.CommandIntent.FIXIT, None), - ( - lazy_fixture("mock_json_runner"), - pe_commands.CommandIntent.PROTOCOL, - JsonProtocolConfig(schema_version=7), - ), + # (lazy_fixture("mock_setup_runner"), pe_commands.CommandIntent.SETUP), + # (lazy_fixture("mock_fixit_runner"), pe_commands.CommandIntent.FIXIT), ( - lazy_fixture("mock_python_runner"), + lazy_fixture("mock_protocol_json_runner"), pe_commands.CommandIntent.PROTOCOL, - PythonProtocolConfig(APIVersion.from_string("2.14")), ), + # ( + # lazy_fixture("mock_protocol_python_runner"), + # pe_commands.CommandIntent.PROTOCOL, + # ), ], ) def test_add_command( @@ -147,13 +160,13 @@ def test_add_command( decoy: Decoy, runner: AnyRunner, command_intent: pe_commands.CommandIntent, - input_protocol_config: Optional[Union[PythonProtocolConfig, JsonProtocolConfig]], ) -> None: """Should verify calls to set_command_queued.""" command_to_queue = pe_commands.HomeCreate.construct( intent=command_intent, params=pe_commands.HomeParams.construct() ) result = subject.add_command(command_to_queue) + assert result == command_to_queue decoy.verify(runner.set_command_queued(command_to_queue))