Exemple #1
0
def test_datastore_direct_fetch(datastore):
    "Verify that directly fetchable elements can be read."
    _direct_key = 'Gs0000'
    _direct_val = O.new_osm_element(C.GEODOC, _direct_key[1:])
    insert_key(_direct_key, O.encode_json(_direct_val))

    v = datastore.fetch(C.GEODOC, _direct_key[1:])
    assert v == _direct_val
def test_datastore_direct_fetch(datastore):
    "Verify that directly fetchable elements can be read."
    _direct_key = 'Gs0000'
    _direct_val = O.new_osm_element(C.GEODOC, _direct_key[1:])
    insert_key(_direct_key, O.encode_json(_direct_val))

    v = datastore.fetch(C.GEODOC, _direct_key[1:])
    assert v == _direct_val
Exemple #3
0
def test_datastore_write_element(datastore):
    "Test the store_element() entry point."

    _geodoc_key = 'Gs0000'
    _geodoc_val = O.new_osm_element(C.GEODOC, _geodoc_key[1:])

    datastore.store_element(C.GEODOC, _geodoc_key[1:], _geodoc_val)

    v = retrieve_key(_geodoc_key)
    assert v == O.encode_json(_geodoc_val)
def test_datastore_write_element(datastore):
    "Test the store_element() entry point."

    _geodoc_key = 'Gs0000'
    _geodoc_val = O.new_osm_element(C.GEODOC, _geodoc_key[1:])

    datastore.store_element(C.GEODOC, _geodoc_key[1:], _geodoc_val)
    
    v = retrieve_key(_geodoc_key)
    assert v == O.encode_json(_geodoc_val)