From 9104bf7c05fc26cb0237f655220723fe7e9c7c67 Mon Sep 17 00:00:00 2001 From: Nicolas Mounet Date: Wed, 23 Jul 2025 08:36:04 +0000 Subject: [PATCH] Fixing tests in test_model_generator.py following previous commits (error messages slightly changed) --- caimira/tests/apps/calculator/test_model_generator.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/caimira/tests/apps/calculator/test_model_generator.py b/caimira/tests/apps/calculator/test_model_generator.py index 259bd870..1626bff7 100644 --- a/caimira/tests/apps/calculator/test_model_generator.py +++ b/caimira/tests/apps/calculator/test_model_generator.py @@ -626,8 +626,8 @@ def test_occupancy_general_params_TypeError(occupancy, error, baseline_form: vir [{"start_time": "10:00", "finish_time": "11:00"}, 'The presence parameter in occupancy group "group_A" should be a valid list. Got .'], [[], 'The presence parameter in occupancy group "group_A" should be a valid, non-empty list. Got [].'], [[["start_time", "10:00", "finish_time", "11:00"]], 'Each presence interval should be a valid dictionary. Got in occupancy group "group_A".'], - [[{"art_time": "10:00", "finish_time": "11:00"}], 'Missing start_time key in presence parameter of occupancy group "group_A". Got keys: art_time, finish_time.'], - [[{"start_time": "10:00", "ish_time": "11:00"}], 'Missing finish_time key in presence parameter of occupancy group "group_A". Got keys: start_time, ish_time.'], + [[{"art_time": "10:00", "finish_time": "11:00"}], 'Missing start_time key in "presence" parameter of occupancy group "group_A". Got keys: art_time, finish_time.'], + [[{"start_time": "10:00", "ish_time": "11:00"}], 'Missing finish_time key in "presence" parameter of occupancy group "group_A". Got keys: start_time, ish_time.'], ] ) def test_occupancy_presence_TypeError(occupancy_presence, error, baseline_form: virus_validator.VirusFormData): @@ -645,8 +645,8 @@ def test_occupancy_presence_TypeError(occupancy_presence, error, baseline_form: @pytest.mark.parametrize( ["occupancy_presence", "error"], [ - [[{"start_time": "10", "finish_time": "11:00"}], 'Invalid time format found in presence parameter of occupancy group "group_A". Expected HH:MM, got 10.'], - [[{"start_time": "10:00", "finish_time": "11"}], 'Invalid time format found in presence parameter of occupancy group "group_A". Expected HH:MM, got 11.'], + [[{"start_time": "10", "finish_time": "11:00"}], 'Invalid time format found in "presence" parameter of occupancy group "group_A". Expected HH:MM, got 10.'], + [[{"start_time": "10:00", "finish_time": "11"}], 'Invalid time format found in "presence" parameter of occupancy group "group_A". Expected HH:MM, got 11.'], ] ) def test_occupancy_presence_ValueError(occupancy_presence, error, baseline_form: virus_validator.VirusFormData):