def test_ventilation_lockability(): """Test the lockability of Ventilation objects.""" ventilation = Ventilation('Office Ventilation', 0.0025, 0.0006) ventilation.flow_per_person = 0.01 ventilation.lock() with pytest.raises(AttributeError): ventilation.flow_per_person = 0.0025 ventilation.unlock() ventilation.flow_per_person = 0.0025
def test_ventilation_setability(): """Test the setting of properties of Ventilation.""" simple_office = ScheduleDay( 'Simple Weekday', [0, 1, 0], [Time(0, 0), Time(9, 0), Time(17, 0)]) schedule = ScheduleRuleset('Office Ventilation Schedule', simple_office, None, schedule_types.fractional) ventilation = Ventilation('Office Ventilation', 0.0025, 0.0006) ventilation.name = 'Office Zone Ventilation' assert ventilation.name == 'Office Zone Ventilation' ventilation.flow_per_person = 0.01 assert ventilation.flow_per_person == 0.01 ventilation.flow_per_area = 0 assert ventilation.flow_per_area == 0 ventilation.flow_per_zone = 1 assert ventilation.flow_per_zone == 1 ventilation.air_changes_per_hour = 2 assert ventilation.air_changes_per_hour == 2 ventilation.schedule = schedule assert ventilation.schedule == schedule