Esempio n. 1
0
 def test_remove_task(self):
     """Should remove and specific task"""
     task_redis_id = self.rd.keys("task:*")[0]
     Task.remove(task_redis_id.replace('task:', ''))
     tasks = self.rd.keys("task:*")
     self.assertEqual(len(tasks), len(TASK_FIXTURES) - 1)
     self.assertFalse(self.rd.keys(task_redis_id))
Esempio n. 2
0
def delete_task():
    next = request.args.get('next', '/')
    Task.remove(request.form['task_id'])
    return redirect(next)