update tests/python_tests/geojson_plugin_test.py

This commit is contained in:
artemp 2015-02-04 18:34:53 +01:00
parent 3331368e05
commit 8faf04663c

View file

@ -23,7 +23,7 @@ if 'geojson' in mapnik.DatasourceCache.plugin_names():
def test_geojson_properties():
ds = mapnik.Datasource(type='geojson',file='../data/json/escaped.geojson')
f = ds.features_at_point(ds.envelope().center()).features[0]
eq_(len(ds.fields()),7)
eq_(len(ds.fields()),9)
desc = ds.describe()
eq_(desc['geometry_type'],mapnik.DataGeometryType.Point)
@ -38,7 +38,7 @@ if 'geojson' in mapnik.DatasourceCache.plugin_names():
ds = mapnik.Datasource(type='geojson',file='../data/json/escaped.geojson')
f = ds.all_features()[0]
eq_(len(ds.fields()),7)
eq_(len(ds.fields()),9)
desc = ds.describe()
eq_(desc['geometry_type'],mapnik.DataGeometryType.Point)
@ -66,7 +66,7 @@ if 'geojson' in mapnik.DatasourceCache.plugin_names():
# @raises(RuntimeError)
def test_that_nonexistant_query_field_throws(**kwargs):
ds = mapnik.Datasource(type='geojson',file='../data/json/escaped.geojson')
eq_(len(ds.fields()),7)
eq_(len(ds.fields()),9)
# TODO - this sorting is messed up
#eq_(ds.fields(),['name', 'int', 'double', 'description', 'boolean', 'NOM_FR'])
#eq_(ds.field_types(),['str', 'int', 'float', 'str', 'bool', 'str'])