def test_title(self): """Test we can set the layer title correctly.""" layer = load_test_vector_layer('impact', 'buildings_without_style.geojson') layer_title(layer) # The code tested is running the same logic as the test itself. # But at least we have a test. exposure_type = layer.keywords['exposure_keywords']['exposure'] exposure_definitions = definition(exposure_type) title = exposure_definitions['layer_legend_title'] layer.setTitle(title) self.assertEqual(title, layer.title())
def test_title(self): """Test we can set the layer title correctly.""" layer = load_test_vector_layer( 'impact', 'buildings_without_style.geojson') layer_title(layer) # The code tested is running the same logic as the test itself. # But at least we have a test. exposure_type = layer.keywords['exposure_keywords']['exposure'] exposure_definitions = definition(exposure_type) title = exposure_definitions['layer_legend_title'] layer.setTitle(title) self.assertEqual(title, layer.title())