def test_geofeature_copy_with_updates_properties(request): feature = GeoFeature(GeoVector(Point(0, 0)), OrderedDict([('prop1', 1), ('prop2', '2')])) new_properties = OrderedDict([('prop2', 1), ('prop3', '2')]) feature_copy = feature.copy_with(properties=new_properties) assert feature != feature_copy assert feature.geometry == feature_copy.geometry assert id(feature.geometry) != id(feature_copy.geometry) assert feature_copy.properties == {'prop1': 1, 'prop2': 1, 'prop3': '2'}
def test_geofeature_copy_with(request): feature = GeoFeature( GeoVector(Point(0, 0)), OrderedDict([('prop1', 1), ('prop2', '2'), ('prop3', datetime(2018, 4, 25, 11, 18))])) feature_copy = feature.copy_with() assert feature == feature_copy assert id(feature.geometry) != id(feature_copy.geometry) assert id(feature.properties) != id(feature_copy.properties)