From 9a6f80edf4832aa895b31523e2841a5653c8c56b Mon Sep 17 00:00:00 2001 From: jaknapper Date: Tue, 3 Mar 2026 14:45:32 +0000 Subject: [PATCH] Update camera_test with extra key --- tests/unit_tests/test_cameras.py | 1 + tests/unit_tests/test_metadata.py | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/unit_tests/test_cameras.py b/tests/unit_tests/test_cameras.py index 40d0bf88..0fcec5ca 100644 --- a/tests/unit_tests/test_cameras.py +++ b/tests/unit_tests/test_cameras.py @@ -98,6 +98,7 @@ def test_thing_description_equivalence(mock_picam_thing): picamera_extra_props = { "mjpeg_bitrate", "colour_correction_matrix", + "gamma_correction", "lens_shading_tables", "sensor_resolution", "capture_metadata", diff --git a/tests/unit_tests/test_metadata.py b/tests/unit_tests/test_metadata.py index 915a5866..7c5f87b6 100644 --- a/tests/unit_tests/test_metadata.py +++ b/tests/unit_tests/test_metadata.py @@ -141,7 +141,7 @@ def test_picamera_adds_metadata(mock_picam_thing): camera.exposure_time = 1234 camera.colour_gains = (1.1, 1.2) camera.analogue_gain = 2.5 - camera.tuning = tf_utils.set_gamma_curve(camera.tuning, {1: 5, 2: 10}) + camera.tuning = tf_utils.set_gamma_curve(camera.tuning, [0, 0, 5, 50]) state = camera.thing_state @@ -151,7 +151,7 @@ def test_picamera_adds_metadata(mock_picam_thing): "exposure_time": 1234, "colour_gains": (1.1, 1.2), "analogue_gain": 2.5, - "gamma_correction": {1: 5, 2: 10}, + "gamma_correction": [0, 0, 5, 50], } @@ -163,7 +163,7 @@ def test_picamera_metadata_written_to_exif(mock_picam_thing, temp_jpeg, mocker): camera.exposure_time = 1234 camera.colour_gains = (1.1, 1.2) camera.analogue_gain = 2.5 - camera.tuning = tf_utils.set_gamma_curve(camera.tuning, {1: 5, 2: 10}) + camera.tuning = tf_utils.set_gamma_curve(camera.tuning, [0, 0, 5, 50]) # Mock the server interface to return the camera's own state mock_interface = mocker.Mock() @@ -184,5 +184,5 @@ def test_picamera_metadata_written_to_exif(mock_picam_thing, temp_jpeg, mocker): "exposure_time": 1234, "colour_gains": [1.1, 1.2], "analogue_gain": 2.5, - "gamma_correction": {"1": 5, "2": 10}, + "gamma_correction": [0, 0, 5, 50], }