Esempio n. 1
0
 def test_secties(self):
     from testconfig import config
     capakey = CapakeyGateway(
         capakey_factory(
             user=config['capakey']['user'],
             password=config['capakey']['password']
         )
     )
     a = Afdeling(44021)
     a.set_gateway(capakey)
     secties = a.secties
     self.assertIsInstance(secties, list)
     self.assertEqual(len(secties), 1)
Esempio n. 2
0
 def test_lazy_load(self):
     from testconfig import config
     capakey = CapakeyGateway(
         capakey_factory(
             user=config['capakey']['user'],
             password=config['capakey']['password']
         )
     )
     a = Afdeling(44021)
     a.set_gateway(capakey)
     self.assertEqual(a.id, 44021)
     self.assertEqual(a.naam, 'GENT  1 AFD')
     self.assertIsNotNone(a.centroid)
     self.assertIsNotNone(a.bounding_box)