Skip to content

Commit

Permalink
read raises
Browse files Browse the repository at this point in the history
  • Loading branch information
TamarZanzouri committed Dec 23, 2024
1 parent 192e39d commit efa879a
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@

from opentrons.drivers.types import ABSMeasurementMode, ABSMeasurementConfig
from opentrons.hardware_control.modules import AbsorbanceReader
from opentrons.protocol_engine.errors import CannotPerformModuleAction, StorageLimitReachedError
from opentrons.protocol_engine.errors import (
CannotPerformModuleAction,
StorageLimitReachedError,
)

from opentrons.protocol_engine.execution import EquipmentHandler
from opentrons.protocol_engine.resources import FileProvider
Expand Down Expand Up @@ -141,9 +144,7 @@ async def test_read_raises_storage_limit(
state_view=state_view, equipment=equipment, file_provider=file_provider
)

params = ReadAbsorbanceParams(
moduleId="unverified-module-id",
)
params = ReadAbsorbanceParams(moduleId="unverified-module-id", fileName="test")

mabsorbance_module_substate = decoy.mock(cls=AbsorbanceReaderSubState)
absorbance_module_hw = decoy.mock(cls=AbsorbanceReader)
Expand All @@ -168,8 +169,10 @@ async def test_read_raises_storage_limit(
reference_wavelength=None,
)
)
decoy.when(mabsorbance_module_substate.configured_wavelengths).then_return(11)
decoy.when(mabsorbance_module_substate.configured_wavelengths).then_return(
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
)

decoy.when(state_view.files.get_filecount()).then_return(390)
with pytest.raises(StorageLimitReachedError):
await subject.execute(params=params)
await subject.execute(params=params)

0 comments on commit efa879a

Please sign in to comment.