Fix tests now background status settings are returned as dictionaries.

This commit is contained in:
Julian Stirling 2025-07-28 08:44:41 +01:00
parent 33413a591a
commit 5296092b6b
2 changed files with 3 additions and 2 deletions

View file

@ -23,6 +23,6 @@ class MockCameraThing:
background_detector_status = BackgroundDetectorStatus( background_detector_status = BackgroundDetectorStatus(
ready=True, ready=True,
settings=ColourChannelDetectSettings(), settings=ColourChannelDetectSettings().model_dump(),
settings_schema={"fake": "schema"}, settings_schema={"fake": "schema"},
) )

View file

@ -70,7 +70,8 @@ def test_partial_base_class(background_image):
bad_algo1 = BadAlgo1() bad_algo1 = BadAlgo1()
status = bad_algo1.status status = bad_algo1.status
assert not status.ready assert not status.ready
assert isinstance(status.settings, ColourChannelDetectSettings) # Check the settings dictionary can be validated as ``ColourChannelDetectSettings``
ColourChannelDetectSettings(**status.settings)
with pytest.raises(NotImplementedError): with pytest.raises(NotImplementedError):
# Should error on any dictionary input. This simulates loading settings from # Should error on any dictionary input. This simulates loading settings from