def test_get_todos_for_user_with_sort_by_title(): user = "******" result = app.get_todos_for_user(user, sort_by='title', tag_filter='test_label2') assert len(result) == 2 assert result[0]['id'] == 'abc123efg456hij789__'
def test_delete_todo_for_user(): user = "******" id_to_delete = 'abc123efg456hij789__' result = app.delete_todo_for_user(user, id_to_delete) assert result == True existing_todos = app.get_todos_for_user(user) assert len(existing_todos) == 1 assert existing_todos[0]['id'] == 'bbc123efg456hij789__'
def test_get_todos_for_user_with_tag_filter(): user = "******" result = app.get_todos_for_user(user, tag_filter='test_label3') assert len(result) == 1 assert result[0]['id'] == 'bbc123efg456hij789__'
def test_get_todos_for_user_with_leave_raw_true(): user = "******" result = app.get_todos_for_user(user, leave_raw=True) assert len(result) == 2 assert type(result[0]) == type("")
def test_get_todos_for_user(): user = "******" result = app.get_todos_for_user(user) assert len(result) == 2 #default sort should put bbc123efg456hij789__ first assert result[0]['id'] == 'bbc123efg456hij789__'