def test_query(fixture, config): p = GeoJSONProvider(config) fields = p.get_fields() assert len(fields) == 1 assert fields['name'] == 'string' results = p.query() assert len(results['features']) == 1 assert results['numberMatched'] == 1 assert results['numberReturned'] == 1 assert results['features'][0]['id'] == '123-456'
def test_query(fixture, config): p = GeoJSONProvider(config) fields = p.get_fields() assert len(fields) == 2 assert fields['name']['type'] == 'string' results = p.query() assert len(results['features']) == 1 assert results['numberMatched'] == 1 assert results['numberReturned'] == 1 assert results['features'][0]['id'] == '123-456' results = p.query(select_properties=['foo']) assert len(results['features'][0]['properties']) == 1 results = p.query(skip_geometry=True) assert results['features'][0]['geometry'] is None