예제 #1
0
def test_query(fixture, config):
    p = GeoJSONProvider(config)
    results = p.query()
    assert len(results['features']) == 1
    assert results['numberMatched'] == 1
    assert results['numberReturned'] == 1
    assert results['features'][0]['properties']['id'] == '123-456'
예제 #2
0
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
예제 #3
0
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'
예제 #4
0
def test_delete(fixture, config):
    p = GeoJSONProvider(config)
    p.delete('123-456')

    results = p.query()
    assert len(results['features']) == 0
예제 #5
0
def test_query(fixture, config):
    p = GeoJSONProvider(config)
    results = p.query()
    assert len(results['features']) == 1
    assert results['features'][0]['id'] == '123-456'