def test_length_window(): file_path = os.path.join(target_folder, 'construction_window_double.json') with open(file_path) as json_file: construction_window = json.load(json_file) cons_length_test = copy(construction_window) for i in range(8): cons_length_test['layers'].append('material_{}'.format(i)) with pytest.raises(ValidationError): WindowConstructionAbridged.parse_obj(cons_length_test) cons_length_test['layers'] = [] with pytest.raises(ValidationError): WindowConstructionAbridged.parse_obj(cons_length_test)
def test_construction_window_triple(): file_path = os.path.join(target_folder, 'construction_window_triple.json') WindowConstructionAbridged.parse_file(file_path)