From 2c17b983d0cfac9525e4ae7b34f94f38952795c4 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Mon, 19 Jun 2023 20:35:55 +0100 Subject: [PATCH] Added test for no data in mainheat controls --- .../test_mainheat_controls_attributes.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/model_data/tests/test_mainheat_controls_attributes.py b/model_data/tests/test_mainheat_controls_attributes.py index e06aa4e9..2eaa1822 100644 --- a/model_data/tests/test_mainheat_controls_attributes.py +++ b/model_data/tests/test_mainheat_controls_attributes.py @@ -35,3 +35,23 @@ class TestMainHeatControlAttributes: for description in invalid_descriptions: with pytest.raises(ValueError): MainheatControlAttributes(description).process() + + def test_process_with_no_data(self): + # Create an instance of MainheatControlAttributes with no description + attributes = MainheatControlAttributes(description="") + + # Call the process method + result = attributes.process() + + # Assert that the result matches the expected dictionary + assert result == { + "thermostatic_control": False, + "charging_system": False, + "switch_system": False, + "no_control": False, + "dhw_control": False, + "community_heating": False, + "multiple_room_thermostats": False, + "auxiliary_systems": False, + "trvs": False + }