safe.impact_statistics.test.test_aggregator module

InaSAFE Disaster risk assessment tool developed by AusAid and World Bank - GUI Test Cases.

Contact : ole.moller.nielsen@gmail.com

Note

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

class safe.impact_statistics.test.test_aggregator.AggregatorTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test the InaSAFE GUI

setUp()[source]

Fixture run before all tests

tearDown()[source]

Run after each test.

test_aggregate_raster_impact_native()[source]

Check aggregation on raster impact using native qgis zonal stats.

TODO: this fails on Tim’s machine but not on MB or Jenkins.

test_aggregate_raster_impact_python()[source]

Check aggregation on raster impact using python zonal stats

test_aggregate_vector_impact()[source]

Test aggregation results on a vector layer. created from loadStandardLayers.qgs with: - a flood in Jakarta like in 2007 - Essential buildings - be flooded - kabupaten_jakarta_singlepart.shp

test_aggregation_attribute_in_keywords()[source]

Aggregation attribute is chosen correctly when present in keywords.

test_check_aggregation_no_attributes()[source]

Aggregation attribute chosen correctly when no attr available.

test_check_aggregation_none_in_keywords()[source]

Aggregation attribute is chosen correctly when None in keywords.

test_check_aggregation_single_attribute()[source]

Aggregation attribute is chosen correctly when there is only one attr available.

test_combo_aggregation_loaded_project()[source]

Aggregation combo changes properly according loaded layers

test_get_centroids()[source]

Test get_centroids work

test_line_aggregation()[source]

Test if line aggregation works

test_preprocessing()[source]

Preprocessing results are correct.

TODO - this needs to be fixed post dock refactor.

test_set_layers()[source]

Test set up aggregator’s layers work

test_set_sum_field_name()[source]

Test sum_field_name work

test_setup_target_field()[source]

Test setup up target field is correct.