Change the classes for gallery cards information to be XxxGalleryInfo
ScanInfo -> ScanGalleryInfo CaptureInfo -> CaptureGalleryInfo - note there were two classes called CaptureInfo, only one has been changed to deduplicate the names
This commit is contained in:
parent
d7421ccea5
commit
90f106c87d
5 changed files with 23 additions and 23 deletions
|
|
@ -17,7 +17,7 @@ from openflexure_microscope_server.scan_directories import (
|
|||
NotEnoughFreeSpaceError,
|
||||
ScanDirectory,
|
||||
ScanDirectoryManager,
|
||||
ScanInfo,
|
||||
ScanGalleryInfo,
|
||||
get_files_in_zip,
|
||||
)
|
||||
|
||||
|
|
@ -202,7 +202,7 @@ def test_scan_sequence_and_listing(caplog):
|
|||
# (more detailed scan_info tests below)
|
||||
all_scan_info = scan_dir_manager.all_scans_info()
|
||||
for scan_info in all_scan_info:
|
||||
assert isinstance(scan_info, ScanInfo)
|
||||
assert isinstance(scan_info, ScanGalleryInfo)
|
||||
assert scan_info.name.startswith("fake_scan_000")
|
||||
assert scan_info.number_of_images == 0
|
||||
assert scan_info.duration is not None
|
||||
|
|
@ -216,7 +216,7 @@ def test_scan_sequence_and_listing(caplog):
|
|||
# Re-read the data with bad data for fake_scan_0004
|
||||
all_scan_info = scan_dir_manager.all_scans_info()
|
||||
for scan_info in all_scan_info:
|
||||
assert isinstance(scan_info, ScanInfo)
|
||||
assert isinstance(scan_info, ScanGalleryInfo)
|
||||
assert scan_info.name.startswith("fake_scan_000")
|
||||
assert scan_info.number_of_images == 0
|
||||
# Bad data for scan 0004. So duration is None.
|
||||
|
|
@ -235,7 +235,7 @@ def test_scan_sequence_and_listing(caplog):
|
|||
# Re-read the data again claiming fake_scan_0004 is ongoing
|
||||
all_scan_info = scan_dir_manager.all_scans_info(ongoing="fake_scan_0004")
|
||||
for scan_info in all_scan_info:
|
||||
assert isinstance(scan_info, ScanInfo)
|
||||
assert isinstance(scan_info, ScanGalleryInfo)
|
||||
assert scan_info.name.startswith("fake_scan_000")
|
||||
assert scan_info.number_of_images == 0
|
||||
# scan 0004 is marked as ongoing, so duration is None.
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ from pydantic import ValidationError
|
|||
import labthings_fastapi as lt
|
||||
|
||||
from openflexure_microscope_server.things.background_detect import ChannelDeviationLUV
|
||||
from openflexure_microscope_server.things.camera import CaptureInfo, simulation
|
||||
from openflexure_microscope_server.things.camera import CaptureGalleryInfo, simulation
|
||||
from openflexure_microscope_server.things.camera.simulation import SimulatedCamera
|
||||
from openflexure_microscope_server.things.stage.dummy import DummyStage
|
||||
|
||||
|
|
@ -297,7 +297,7 @@ def test_gallery_responses(camera, mocker, caplog):
|
|||
with tempfile.TemporaryDirectory() as tmpdir, caplog.at_level(logging.INFO):
|
||||
camera._data_dir = tmpdir
|
||||
|
||||
assert camera.gallery_data_schema == CaptureInfo
|
||||
assert camera.gallery_data_schema == CaptureGalleryInfo
|
||||
|
||||
# When we start there are no captures
|
||||
assert camera.get_data_for_gallery() == []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue