Exemplo n.º 1
0
def test_delete_document(db_conn, vases_table):
    tablename = 'vases'
    documents = create_test_data_set(db_conn, vases_table)
    assert len(documents) == 3
    util.delete_document(tablename, documents[0]['id'], db_conn)
    params = {}
    documents = list(util.list_documents(tablename, params, db_conn))
    assert len(documents) == 2
Exemplo n.º 2
0
def test_delete_document(db_conn, vases_table):
    tablename = 'vases'
    documents = create_test_data_set(db_conn, vases_table)
    assert len(documents) == 3
    util.delete_document(tablename, documents[0]['id'], db_conn)
    params = {}
    documents = list(util.list_documents(tablename, params, db_conn))
    assert len(documents) == 2
Exemplo n.º 3
0
def test_list_documents(db_conn, vases_table):
    tablename = 'vases'
    create_test_data_set(db_conn, vases_table)
    params = {'shape': 'round'}
    documents = list(util.list_documents(tablename, params, db_conn))
    assert len(documents) == 2
Exemplo n.º 4
0
def test_list_documents(db_conn, vases_table):
    tablename = 'vases'
    create_test_data_set(db_conn, vases_table)
    params = {'shape': 'round'}
    documents = list(util.list_documents(tablename, params, db_conn))
    assert len(documents) == 2