def test_getMapTitle(self): """Getting the map title from the keywords""" myLayer, _ = loadLayer('test_floodimpact.tif') myMap = Map(IFACE) myMap.setImpactLayer(myLayer) myTitle = myMap.getMapTitle() myExpectedTitle = 'Penduduk yang Mungkin dievakuasi' myMessage = 'Expected: %s\nGot:\n %s' % (myExpectedTitle, myTitle) assert myTitle == myExpectedTitle, myMessage
def test_handleMissingMapTitle(self): """Missing map title from the keywords fails gracefully""" # TODO running OSM Buildngs with Pendudk Jakarta # wasthrowing an error when requesting map title # that this test wasnt replicating well myLayer, _ = loadLayer('population_padang_1.asc') myMap = Map(IFACE) myMap.setImpactLayer(myLayer) myTitle = myMap.getMapTitle() myExpectedTitle = None myMessage = 'Expected: %s\nGot:\n %s' % (myExpectedTitle, myTitle) assert myTitle == myExpectedTitle, myMessage