def test_set_ancestor_fields_for_country(self): assert self.country["admin_level"] is 0 assert self.child_json["properties"]["is_in_country"] is None result = process.set_ancestor_fields(self.country, self.child_json) assert self.country["osm_id"] is result["properties"]["parent_id"] assert self.country["osm_id"] is result["properties"]["is_in_country"]
def test_set_ancestor_fields_for_country(self): assert self.country['admin_level'] is 0 assert self.child_json['properties']['is_in_country'] is None result = process.set_ancestor_fields(self.country, self.child_json) assert self.country['osm_id'] is result['properties']['parent_id'] assert self.country['osm_id'] is result['properties']['is_in_country']
def test_set_ancestor_fields(self): assert self.child_json["properties"]["parent_id"] is None assert self.ancestor_fields["osm_id"] is not self.child_json["properties"]["parent_id"] result = process.set_ancestor_fields(self.ancestor_fields, self.child_json) assert self.ancestor_fields["osm_id"] is result["properties"]["parent_id"] assert self.ancestor_fields["is_in_country"] is result["properties"]["is_in_country"] assert self.ancestor_fields["is_in_country"] is not result["properties"]["parent_id"]
def test_set_ancestor_fields(self): assert self.child_json['properties']['parent_id'] is None assert self.ancestor_fields['osm_id'] is not self.child_json[ 'properties']['parent_id'] result = process.set_ancestor_fields(self.ancestor_fields, self.child_json) assert self.ancestor_fields['osm_id'] is result['properties'][ 'parent_id'] assert self.ancestor_fields['is_in_country'] is result['properties'][ 'is_in_country'] assert self.ancestor_fields['is_in_country'] is not result[ 'properties']['parent_id']