safe.gui.tools.test.test_wizard_dialog 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.gui.tools.test.test_wizard_dialog.WizardDialogTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test the InaSAFE wizard GUI

check_current_step(expected_step, dialog)[source]

Helper function to check the current step is expected_step

Parameters:
  • expected_step (int) – The expected current step.
  • dialog (WizardDialog) – The dialog that contains a wizard.
check_current_text(expected_text, list_widget)[source]

Check the current text in list widget is expected_text

Parameters:
  • expected_text (str) – The expected current step.
  • list_widget (QListWidget) – List widget that wants to be checked.
check_list(expected_list, list_widget)[source]

Helper function to check that list_widget is equal to expected_list.

Parameters:
  • expected_list (QListWidget) – List of expected values to be found.
  • list_widget – List widget that wants to be checked.
select_from_list_widget(option, list_widget)[source]

Helper function to select option from list_widget

Parameters:
  • option (str) – Option to be chosen
  • list_widget (QListWidget) – List widget that wants to be checked.
setUp()[source]
tearDown()[source]

Run after each test.

test_auto_select_one_item()[source]

Test auto select if there is only one item in a list.

test_default_attributes_value()[source]

Checking that default attributes is set to the CIA’s one.

test_existing_aggregation_keywords()[source]

Test for case existing keywords in aggregation layer.

test_existing_complex_keywords()[source]
test_existing_keywords()[source]

Test if keywords already exist.

test_input_function_centric_wizard()[source]

Test the IFCW mode.

test_integrated_line()[source]

Test for line layer and all possibilities.

test_integrated_point()[source]

Test for point layer and all possibilities.

test_integrated_polygon()[source]

Test for polygon layer and all possibilities.

test_integrated_raster()[source]

Test for raster layer and all possibilities.

test_keywords_creation_wizard()[source]

Test how the widgets work.

test_point_layer()[source]

Wizard for point layer.

test_sum_ratio_behavior()[source]

Test for wizard’s behavior related sum of age ratio.

test_unit_building_generic()[source]

Test for case existing building generic unit for structure.

test_unknown_unit()[source]

Checking that it works for unknown unit.