def test_update(self):
     p = Pydo(USER)
     tasktr = "test update #task"
     updatedTaskstr = "test #task is updated"
     p.create(taskstr)
     p.save()
     p = False
     # not sure if it even compiles but I don't want to lose the work done in lunch
     rv = self.app.put(HOME + "update", data=taskstr + "\r\n" + updatedTaskstr)
     p = Pydo(USER)
     assert 1 == len(p.tasks())
     assert updatedTaskstr == p.tasks()[0]._text
 def test_delete(self):
     p = Pydo(USER)
     taskstr = "one #test task"
     p.create(taskstr)
     p.save()
     p = False
     rv = self.app.post(HOME +"delete", data=taskstr)
     p = Pydo(USER)
     assert 0 == len(p.tasks())
 def test_create(self):
     rv = self.app.post("create", data="test create from #tests")
     p = Pydo(USER)
     assert 1 == len(p.tasks())
Exemple #4
0
from pydo.pydo import Pydo

p = Pydo('3bf2402f51385ea7c85a9be66815ce51fba33eb34c28d123771f9b441aa64b72')
p.reset()
p.create('#sleep is good')
p.create('sleep is #awesome')
p.save()
assert(len(p.tasks()) == 2)
print('Injected '+str(len(p.tasks()))+' tasks')
Exemple #5
0
def tasks(user):
    p = Pydo(user)
    return json.dumps([task.traits() for task in p.tasks()])