def test_load_shapefiles_call_loader(self): # Load a sample config file and call loader def loader(section, options, testobject=self): testobject.assertTrue(os.path.exists(options['shapefile'])) if section == 'Afvoervlakken': testobject.assertEquals(options['thisisatest'], 'whee') elif section == 'AlmereGebieden': testobject.assertEquals(options['thisisatest'], 'boo') testconfig = resource_filename('lizard_rainapp', 'testshapes/testshapes.cfg') load_shapefiles(testconfig, loader)
def dummy_file(): testdummyconfig = resource_filename('lizard_rainapp', 'testshapes/testdummy.cfg') load_shapefiles(testdummyconfig, None)
def unexisting_file(): load_shapefiles("wheeee", None)