def setup_test_todos_for_user(): app._redis.flushdb() user = "******" todo1 = { 'id': 'abc123efg456hij789__', 'title': 'A test thing to do #1.', 'dueDate': 1362355210011, 'labels': [ 'test_label1', 'test_label2' ], 'completed': False } app.save_todo_for_user(user, todo1) todo2 = { 'id': 'bbc123efg456hij789__', 'title': 'A test thing to do #2.', 'dueDate': 1362355210001, 'labels': [ 'test_label3', 'test_label2' ], 'completed': False } app.save_todo_for_user(user, todo2)
def setup_test_todos_for_user(): app._redis.flushdb() user = "******" todo1 = { 'id': 'abc123efg456hij789__', 'title': 'A test thing to do #1.', 'dueDate': 1362355210011, 'labels': ['test_label1', 'test_label2'], 'completed': False } app.save_todo_for_user(user, todo1) todo2 = { 'id': 'bbc123efg456hij789__', 'title': 'A test thing to do #2.', 'dueDate': 1362355210001, 'labels': ['test_label3', 'test_label2'], 'completed': False } app.save_todo_for_user(user, todo2)
def test_save_todo_for_user(): user = "******" todo = { 'id': 'abc123efg456hij789__', 'title': 'A test thing to do.', 'dueDate': 1362355210001, 'labels': ['test_label1', 'test_label2'], 'completed': False } result = app.save_todo_for_user(user, todo) print(result) assert (result)
def test_save_todo_for_user(): user = "******" todo = { 'id': 'abc123efg456hij789__', 'title': 'A test thing to do.', 'dueDate': 1362355210001, 'labels': [ 'test_label1', 'test_label2' ], 'completed': False } result = app.save_todo_for_user(user, todo) print(result) assert(result)