Example #1
0
def test_add_is_operation():
    res = add(table_name='users', item={'username': '******'})
    assertIsOperation(res)
Example #2
0
def test_query_is_operation():
    res = query(
        table_name='users',
        conditions=attr('username').equals('sunshie')
    )
    assertIsOperation(res)
Example #3
0
def test_create_is_operation():
    res = create(table_name='users', hash_key='username')
    assertIsOperation(res)
Example #4
0
def test_find_is_operation():
    res = find(table_name='users', key={ 'username': '******'})
    assertIsOperation(res)
Example #5
0
def test_update_is_operation():
    res = update(table_name='users',
                 key={'username': '******'},
                 attributes={'role': 'admin'})
    assertIsOperation(res)
Example #6
0
def test_scan_is_operation():
    res = scan(table_name='users')
    assertIsOperation(res)
Example #7
0
def test_delete_is_operation():
    res = delete(table_name='users', key={'username': '******'})
    assertIsOperation(res)