Fix typos when moving hardware test suit to new test env structure
This commit is contained in:
parent
782977e01c
commit
765404656a
3 changed files with 6 additions and 6 deletions
|
|
@ -34,4 +34,4 @@ def camera_test_client(settings_folder: Optional[str] = None):
|
||||||
temporary directory will be used as the settings folder.
|
temporary directory will be used as the settings folder.
|
||||||
"""
|
"""
|
||||||
with camera_test_env(settings_folder=settings_folder) as env:
|
with camera_test_env(settings_folder=settings_folder) as env:
|
||||||
return env.get_thing_client("camera")
|
yield env.get_thing_client("camera")
|
||||||
|
|
|
||||||
|
|
@ -4,18 +4,18 @@ import pytest
|
||||||
|
|
||||||
import labthings_fastapi as lt
|
import labthings_fastapi as lt
|
||||||
|
|
||||||
from .cam_test_utils import camera_test_client_and_server
|
from .cam_test_utils import camera_test_env
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def picamera_test_env() -> lt.ThingClient:
|
def picamera_test_env() -> lt.ThingClient:
|
||||||
"""Initialise a test environment with only a StreamingPiCamera2 Thing."""
|
"""Initialise a test environment with only a StreamingPiCamera2 Thing."""
|
||||||
with camera_test_client_and_server() as env:
|
with camera_test_env() as env:
|
||||||
yield env
|
yield env
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def picamera_client() -> lt.ThingClient:
|
def picamera_client() -> lt.ThingClient:
|
||||||
"""Initialise a test picamera_client (in a LabThings test env)."""
|
"""Initialise a test picamera_client (in a LabThings test env)."""
|
||||||
with camera_test_client_and_server() as env:
|
with camera_test_env() as env:
|
||||||
return env.get_thing_client["camera"]
|
yield env.get_thing_client("camera")
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ from .cam_test_utils import camera_test_client
|
||||||
|
|
||||||
def test_calibration(picamera_test_env):
|
def test_calibration(picamera_test_env):
|
||||||
"""Check that full auto calibrate completes and set the expected values."""
|
"""Check that full auto calibrate completes and set the expected values."""
|
||||||
picamera_client, server = picamera_test_env.get_thing_client["camera"]
|
picamera_client = picamera_test_env.get_thing_client("camera")
|
||||||
picamera_thing = picamera_test_env.get_thing_by_type(StreamingPiCamera2)
|
picamera_thing = picamera_test_env.get_thing_by_type(StreamingPiCamera2)
|
||||||
# Check the calibration_required property used by the calibration wizard
|
# Check the calibration_required property used by the calibration wizard
|
||||||
assert picamera_thing.calibration_required
|
assert picamera_thing.calibration_required
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue