def test_hazard_additional_keywords(self): """Test for hazard_additional_keywords.""" impact_function = FloodPolygonBuildingFunction() result = impact_function.metadata().hazard_additional_keywords( layer_mode_key='classified', layer_geometry_key='polygon', hazard_category_key='single_event', hazard_key='flood') expected = [] self.assertItemsEqual(result, expected) result = impact_function.metadata().hazard_additional_keywords( layer_mode_key='classified', layer_geometry_key='polygon', hazard_category_key='single_event', ) expected = [] self.assertItemsEqual(result, expected) impact_function = VolcanoPointBuildingFunction() result = impact_function.metadata().hazard_additional_keywords( layer_mode_key='classified', layer_geometry_key='point', hazard_category_key='multiple_event', hazard_key='volcano') expected = [volcano_name_field] self.assertItemsEqual(result, expected)
def test_hazard_additional_keywords(self): """Test for hazard_additional_keywords.""" impact_function = FloodPolygonBuildingFunction() result = impact_function.metadata().hazard_additional_keywords( layer_mode_key='classified', layer_geometry_key='polygon', hazard_category_key='single_event', hazard_key='flood' ) expected = [] self.assertItemsEqual(result, expected) result = impact_function.metadata().hazard_additional_keywords( layer_mode_key='classified', layer_geometry_key='polygon', hazard_category_key='single_event', ) expected = [] self.assertItemsEqual(result, expected) impact_function = VolcanoPointBuildingFunction() result = impact_function.metadata().hazard_additional_keywords( layer_mode_key='classified', layer_geometry_key='point', hazard_category_key='multiple_event', hazard_key='volcano' ) expected = [volcano_name_field] self.assertItemsEqual(result, expected)
def test_exposure_class_fields(self): """Test for exposure_class_fields.""" impact_function = FloodPolygonBuildingFunction() result = impact_function.metadata().exposure_class_fields( layer_mode_key='classified', layer_geometry_key='polygon', exposure_key='structure') expected = [structure_class_field] self.assertItemsEqual(result, expected) result = impact_function.metadata().exposure_class_fields( layer_geometry_key='polygon', exposure_key='structure') expected = [structure_class_field] self.assertItemsEqual(result, expected)
def test_exposure_class_fields(self): """Test for exposure_class_fields.""" impact_function = FloodPolygonBuildingFunction() result = impact_function.metadata().exposure_class_fields( layer_mode_key='classified', layer_geometry_key='polygon', exposure_key='structure' ) expected = [structure_class_field] self.assertItemsEqual(result, expected) result = impact_function.metadata().exposure_class_fields( layer_geometry_key='polygon', exposure_key='structure' ) expected = [structure_class_field] self.assertItemsEqual(result, expected)
def test_hazard_additional_keywords(self): """Test for hazard_additional_keywords.""" impact_function = FloodPolygonBuildingFunction() result = impact_function.metadata().hazard_additional_keywords( layer_mode_key='classified', layer_geometry_key='polygon', hazard_category_key='single_event', hazard_key='flood' ) expected = [] self.assertItemsEqual(result, expected) result = impact_function.metadata().hazard_additional_keywords( layer_mode_key='classified', layer_geometry_key='polygon', hazard_category_key='single_event', ) expected = [] print [x['key'] for x in result]
def test_hazard_additional_keywords(self): """Test for hazard_additional_keywords.""" impact_function = FloodPolygonBuildingFunction() result = impact_function.metadata().hazard_additional_keywords( layer_mode_key='classified', layer_geometry_key='polygon', hazard_category_key='single_event', hazard_key='flood') expected = [] self.assertItemsEqual(result, expected) result = impact_function.metadata().hazard_additional_keywords( layer_mode_key='classified', layer_geometry_key='polygon', hazard_category_key='single_event', ) expected = [] print[x['key'] for x in result] self.assertItemsEqual(result, expected)