self.check_post({}, '/todo?id=1')
self.check_json_get('/todo?id=1', exp)
# test posting doneness, comment, calendarization, effort
- todo_post = {'done': 1, 'calendarize': 1,
+ todo_post = {'is_done': 1, 'calendarize': 1,
'comment': 'foo', 'effort': 2.3}
self._post_exp_todo(1, todo_post, exp)
self.check_json_get('/todo?id=1', exp)
# test Todo with adoptee can only be set done if adoptee is done too
self.post_exp_day([], {'new_todo': [1]})
self.post_exp_day([], {'new_todo': [1]})
- self.check_post({'adopt': 2, 'done': 1}, '/todo?id=1', 400)
- self.check_post({'done': 1}, '/todo?id=2')
- self.check_post({'adopt': 2, 'done': 1}, '/todo?id=1', 302)
+ self.check_post({'adopt': 2, 'is_done': 1}, '/todo?id=1', 400)
+ self.check_post({'is_done': 1}, '/todo?id=2')
+ self.check_post({'adopt': 2, 'is_done': 1}, '/todo?id=1', 302)
# test Todo cannot be set undone with adopted Todo not done yet
- self.check_post({'done': 0}, '/todo?id=2')
- self.check_post({'adopt': 2, 'done': 0}, '/todo?id=1', 400)
+ self.check_post({'is_done': 0}, '/todo?id=2')
+ self.check_post({'adopt': 2, 'is_done': 0}, '/todo?id=1', 400)
# test unadoption relieves block
- self.check_post({'done': 0}, '/todo?id=1', 302)
+ self.check_post({'is_done': 0}, '/todo?id=1', 302)
# test Condition being set or unset can block doneness setting
c1_post = {'title': '', 'description': '', 'is_active': 0}
c2_post = {'title': '', 'description': '', 'is_active': 1}
self.check_post(c1_post, '/condition', redir='/condition?id=1')
self.check_post(c2_post, '/condition', redir='/condition?id=2')
- self.check_post({'conditions': [1], 'done': 1}, '/todo?id=1', 400)
- self.check_post({'done': 1}, '/todo?id=1', 302)
- self.check_post({'done': 0}, '/todo?id=1', 302)
- self.check_post({'blockers': [2], 'done': 1}, '/todo?id=1', 400)
- self.check_post({'done': 1}, '/todo?id=1', 302)
+ self.check_post({'conditions': [1], 'is_done': 1}, '/todo?id=1', 400)
+ self.check_post({'is_done': 1}, '/todo?id=1', 302)
+ self.check_post({'is_done': 0}, '/todo?id=1', 302)
+ self.check_post({'blockers': [2], 'is_done': 1}, '/todo?id=1', 400)
+ self.check_post({'is_done': 1}, '/todo?id=1', 302)
# test setting Todo doneness can set/un-set Conditions, but only on
# doneness change, not by mere passive state
- self.check_post({'done': 0}, '/todo?id=2', 302)
- self.check_post({'enables': [1], 'done': 1}, '/todo?id=1')
- self.check_post({'conditions': [1], 'done': 1}, '/todo?id=2', 400)
- self.check_post({'enables': [1], 'done': 0}, '/todo?id=1')
- self.check_post({'enables': [1], 'done': 1}, '/todo?id=1')
- self.check_post({'conditions': [1], 'done': 1}, '/todo?id=2')
- self.check_post({'blockers': [1], 'done': 0}, '/todo?id=2', 400)
- self.check_post({'disables': [1], 'done': 1}, '/todo?id=1')
- self.check_post({'blockers': [1], 'done': 0}, '/todo?id=2', 400)
+ self.check_post({'is_done': 0}, '/todo?id=2', 302)
+ self.check_post({'enables': [1], 'is_done': 1}, '/todo?id=1')
+ self.check_post({'conditions': [1], 'is_done': 1}, '/todo?id=2', 400)
+ self.check_post({'enables': [1], 'is_done': 0}, '/todo?id=1')
+ self.check_post({'enables': [1], 'is_done': 1}, '/todo?id=1')
+ self.check_post({'conditions': [1], 'is_done': 1}, '/todo?id=2')
+ self.check_post({'blockers': [1], 'is_done': 0}, '/todo?id=2', 400)
+ self.check_post({'disables': [1], 'is_done': 1}, '/todo?id=1')
+ self.check_post({'blockers': [1], 'is_done': 0}, '/todo?id=2', 400)
self.check_post({'disables': [1]}, '/todo?id=1')
- self.check_post({'disables': [1], 'done': 1}, '/todo?id=1')
+ self.check_post({'disables': [1], 'is_done': 1}, '/todo?id=1')
self.check_post({'blockers': [1]}, '/todo?id=2')