diff --git a/api/tests/opentrons/drivers/absorbance_reader/test_driver.py b/api/tests/opentrons/drivers/absorbance_reader/test_driver.py index a75e998a370..e9b6d4889fe 100644 --- a/api/tests/opentrons/drivers/absorbance_reader/test_driver.py +++ b/api/tests/opentrons/drivers/absorbance_reader/test_driver.py @@ -23,8 +23,8 @@ def mock_device() -> MagicMock: class MockErrorCode(Enum): - BYONOY_ERROR_NO_ERROR = "no_error" - BYONOY_ERROR = "error" + ERROR_NO_ERROR = "no_error" + ERROR = "error" @pytest.fixture @@ -50,20 +50,20 @@ async def test_driver_connect_disconnect( mock_interface: MagicMock, driver: AbsorbanceReaderDriver, ) -> None: - mock_interface.byonoy_open_device.return_value = ( - MockErrorCode.BYONOY_ERROR_NO_ERROR, + mock_interface.open_device.return_value = ( + MockErrorCode.ERROR_NO_ERROR, 1, ) assert not await driver.is_connected() await driver.connect() - mock_interface.byonoy_open_device.assert_called_once() + mock_interface.open_device.assert_called_once() assert await driver.is_connected() assert driver._connection._verify_device_handle() assert driver._connection._device_handle == 1 - mock_interface.byonoy_free_device.return_value = MockErrorCode.BYONOY_ERROR_NO_ERROR + mock_interface.free_device.return_value = MockErrorCode.ERROR_NO_ERROR await driver.disconnect() assert not await driver.is_connected() @@ -80,14 +80,14 @@ async def test_driver_get_device_info( DEVICE_INFO.sn = "SN: BYOMAA00013 REF: DE MAA 001" DEVICE_INFO.version = "Absorbance V1.0.2 2024-04-18" - mock_interface.byonoy_get_device_information.return_value = ( - MockErrorCode.BYONOY_ERROR_NO_ERROR, + mock_interface.get_device_information.return_value = ( + MockErrorCode.ERROR_NO_ERROR, DEVICE_INFO, ) info = await connected_driver.get_device_info() - mock_interface.byonoy_get_device_information.assert_called_once() + mock_interface.get_device_information.assert_called_once() assert info == {"serial": "BYOMAA00013", "model": "ABS96", "version": "v1.0.2"} @@ -102,14 +102,14 @@ async def test_driver_get_lid_status( module_status: AbsorbanceReaderLidStatus, ) -> None: - mock_interface.byonoy_get_device_parts_aligned.return_value = ( - MockErrorCode.BYONOY_ERROR_NO_ERROR, + mock_interface.get_device_parts_aligned.return_value = ( + MockErrorCode.ERROR_NO_ERROR, parts_aligned, ) status = await connected_driver.get_lid_status() - mock_interface.byonoy_get_device_parts_aligned.assert_called_once() + mock_interface.get_device_parts_aligned.assert_called_once() assert status == module_status @@ -118,8 +118,8 @@ async def test_driver_get_supported_wavelengths( connected_driver: AbsorbanceReaderDriver, ) -> None: SUPPORTED_WAVELENGTHS = [450, 500] - mock_interface.byonoy_abs96_get_available_wavelengths.return_value = ( - MockErrorCode.BYONOY_ERROR_NO_ERROR, + mock_interface.abs96_get_available_wavelengths.return_value = ( + MockErrorCode.ERROR_NO_ERROR, SUPPORTED_WAVELENGTHS, ) @@ -127,7 +127,7 @@ async def test_driver_get_supported_wavelengths( wavelengths = await connected_driver.get_available_wavelengths() - mock_interface.byonoy_abs96_get_available_wavelengths.assert_called_once() + mock_interface.abs96_get_available_wavelengths.assert_called_once() assert connected_driver._connection._supported_wavelengths == SUPPORTED_WAVELENGTHS assert wavelengths == SUPPORTED_WAVELENGTHS @@ -138,8 +138,8 @@ async def test_driver_initialize_and_read( ) -> None: # set up mock interface connected_driver._connection._supported_wavelengths = [450, 500] - mock_interface.byonoy_abs96_initialize_single_measurement.return_value = ( - MockErrorCode.BYONOY_ERROR_NO_ERROR + mock_interface.abs96_initialize_single_measurement.return_value = ( + MockErrorCode.ERROR_NO_ERROR ) mock_interface.ByonoyAbs96SingleMeasurementConfig = MagicMock( spec=AbsorbanceHidInterface.MeasurementConfig @@ -151,18 +151,18 @@ async def test_driver_initialize_and_read( conf = connected_driver._connection._current_config assert conf and conf.sample_wavelength == 450 - mock_interface.byonoy_abs96_initialize_single_measurement.assert_called_once_with( + mock_interface.abs96_initialize_single_measurement.assert_called_once_with( 1, conf ) # setup up mock interface MEASURE_RESULT = [0.1] * 96 - mock_interface.byonoy_abs96_single_measure.return_value = ( - MockErrorCode.BYONOY_ERROR_NO_ERROR, + mock_interface.abs96_single_measure.return_value = ( + MockErrorCode.ERROR_NO_ERROR, MEASURE_RESULT, ) result = await connected_driver.get_single_measurement(450) - mock_interface.byonoy_abs96_single_measure.assert_called_once_with(1, conf) + mock_interface.abs96_single_measure.assert_called_once_with(1, conf) assert result == MEASURE_RESULT