Esempio n. 1
0
    def test_single_aggregation_trees(self):
        aggregation_tree = {"org_chart": ["CEO", "Architect", "Developer"]}
        entity = Entity(geocode="1234", geoname="Accra", unique_name="Kajelo CHPS", aggregation_tree=aggregation_tree)
        entity.save()

        loaded_entity = query.get(uuid=entity.uuid)
        self.assertEqual(loaded_entity.aggregation_tree["org_chart"], ["CEO", "Architect", "Developer"])
Esempio n. 2
0
    def test_load_entity(self):
        entity = Entity(geocode="123466", geoname="Ghana", unique_name="Navio CHPS")
        entity.save()

        loaded_entity = query.get(uuid=entity.uuid)
        self.assertEqual(loaded_entity.uuid, entity.uuid)