tests: Save references to Task instances in the Test instance

This commit is contained in:
Tomas Babej 2015-03-27 17:58:24 +01:00
parent 6a8e9063e8
commit eedff406f8

View file

@ -33,8 +33,12 @@ class IntegrationTest(object):
self.dir = tempfile.mkdtemp(dir='/tmp/')
self.tw = TaskWarrior(data_location=self.dir)
for task_kwargs in self.tasks:
Task(self.tw, **task_kwargs).save()
new_tasks = [Task(self.tw, **task_kwargs)
for task_kwargs in self.tasks]
self.tasks = new_tasks
for task in self.tasks:
task.save()
def setup(self):
self.generate_data()