コード例 #1
0
ファイル: test_database_util.py プロジェクト: wincax88/sagefy
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
コード例 #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
コード例 #3
0
ファイル: test_database_util.py プロジェクト: wincax88/sagefy
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
コード例 #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