Exemplo n.º 1
0
def test_get_lists(todoable_keys):
    """
    Test API Call for get_list
    """

    token = todoable_keys.get('token')
    response = TODOABLE.get_lists(token)

    assert isinstance(response, dict)
    assert response.get('lists') != None
Exemplo n.º 2
0
def test_get_list_tasks(todoable_keys):
    """
    Test API Call for get_list_tasks
    """

    token = todoable_keys.get('token')
    list_id = todoable_keys.get('list_id')
    response = TODOABLE.get_list_tasks(token, list_id)

    assert isinstance(response, dict)
    assert response.get('items') != None
Exemplo n.º 3
0
def test_post_list(todoable_keys):
    """
    Test API Call for post_list
    """

    token = todoable_keys.get('token')
    name = todoable_keys.get('add_list_name')
    response = TODOABLE.post_list(token, name)

    assert isinstance(response, dict)
    assert response.get('name') != None
Exemplo n.º 4
0
def test_login(todoable_keys):
    """
    Test API Call for login
    """

    username = todoable_keys.get('username')
    password = todoable_keys.get('password')
    response = TODOABLE.login(username, password)

    assert isinstance(response, dict)
    assert response.get('token') != None
Exemplo n.º 5
0
def test_delete_list(todoable_keys):
    """
    Test API Call for delete_list
    """

    token = todoable_keys.get('token')
    list_id = todoable_keys.get('list_id')
    response = TODOABLE.delete_list(token, list_id)

    assert isinstance(response, str)
    assert response == 'list deleted'
Exemplo n.º 6
0
def test_complete_task_in_list(todoable_keys):
    """
    Test API Call for test_complete_task_in_list
    """

    token = todoable_keys.get('token')
    list_id = todoable_keys.get('list_id')
    item_id = todoable_keys.get('item_id')
    response = TODOABLE.complete_task_in_list(token, list_id, item_id)

    assert isinstance(response, str)
    assert response == 'marked finished'
Exemplo n.º 7
0
def test_update_list(todoable_keys):
    """
    Test API Call for update_list
    """

    token = todoable_keys.get('token')
    list_id = todoable_keys.get('list_id')
    name = todoable_keys.get('update_list_name')
    response = TODOABLE.update_list(token, list_id, name)

    assert isinstance(response, str)
    assert response == 'list updated'
Exemplo n.º 8
0
def login(event):
    user = event.get('username', None)
    pwd = event.get('password', None)
    response = TODOABLE.login(user, pwd)
    return (response)
Exemplo n.º 9
0
def delete_task_in_list(event):
    token = event.get('token', None)
    list_id = event.get('list_id', None)
    item_id = event.get('item_id', None)
    response = TODOABLE.delete_task_in_list(token, list_id, item_id)
    return (response)
Exemplo n.º 10
0
def post_task_in_list(event):
    token = event.get('token', None)
    list_id = event.get('list_id', None)
    name = event.get('name', None)
    response = TODOABLE.post_task_in_list(token, list_id, name)
    return (response)
Exemplo n.º 11
0
def update_list(event):
    token = event.get('token', None)
    list_id = event.get('list_id', None)
    name = event.get('name', None)
    response = TODOABLE.update_list(token, list_id, name)
    return (response)
Exemplo n.º 12
0
def get_list_tasks(event):
    token = event.get('token', None)
    list_id = event.get('list_id', None)
    response = TODOABLE.get_list_tasks(token, list_id)
    return (response)
Exemplo n.º 13
0
def post_list(event):
    token = event.get('token', None)
    name = event.get('name', None)
    response = TODOABLE.post_list(token, name)
    return (response)
Exemplo n.º 14
0
def get_lists(event):
    token = event.get('token', None)
    response = TODOABLE.get_lists(token)
    return (response)