Beispiel #1
0
 def test_pilih_desa_dari_kelurahan(self):
     geolevel = "kelurahan"
     geoname = "tebet timur"
     quantity = 3
     div_factor = np.int(1e0)
     hal = Halimun("172.19.0.11")
     hasil = hal.pilih_banyak_desa(geoname, geolevel, quantity)
     id_admin = hal.cari_admin(geoname, geolevel)
     assert hasil[0] == geolevel
     assert hasil[1] == geoname
     assert len(hasil[2]) == quantity
     for i in hasil[2]:
         assert i / div_factor == id_admin
Beispiel #2
0
 def test_pilih_desa_dari_kabupaten(self):
     geolevel = "kabupaten"
     geoname = "jakarta selatan"
     quantity = 6
     div_factor = np.int(1e6)
     hal = Halimun("172.19.0.11")
     hasil = hal.pilih_banyak_desa(geoname, geolevel, quantity)
     id_admin = hal.cari_admin(geoname, geolevel)
     assert hasil[0] == geolevel
     assert hasil[1] == geoname
     assert len(hasil[2]) == quantity
     for i in hasil[2]:
         assert i / div_factor == id_admin
Beispiel #3
0
 def test_simple_search_provinsi(self):
     hal = Halimun("172.19.0.11")
     id_admin = hal.cari_admin("jakarta", "provinsi")
     assert id_admin == 31