"""Test Todos module."""
from tests.utils import TestCaseWithDB, TestCaseWithServer
from plomtask.todos import Todo, TodoNode
-from plomtask.processes import Process
+from plomtask.processes import Process, ProcessStep
from plomtask.conditions import Condition
from plomtask.exceptions import (NotFoundException, BadFormatException,
HandledException)
proc4.save(self.db_conn)
assert isinstance(proc4.id_, int)
# make proc4 step of proc3
- proc3.set_steps(self.db_conn, [(None, proc4.id_, None)])
+ step = ProcessStep(None, proc3.id_, proc4.id_, None)
+ proc3.set_steps(self.db_conn, [step])
# give proc2 three steps; 2× proc1, 1× proc3
- proc2.set_steps(self.db_conn, [(None, self.proc.id_, None),
- (None, self.proc.id_, None),
- (None, proc3.id_, None)])
+ step1 = ProcessStep(None, proc2.id_, self.proc.id_, None)
+ step2 = ProcessStep(None, proc2.id_, self.proc.id_, None)
+ step3 = ProcessStep(None, proc2.id_, proc3.id_, None)
+ proc2.set_steps(self.db_conn, [step1, step2, step3])
# test mere creation does nothing
todo_ignore = Todo(None, proc2, False, self.date1)
todo_ignore.save(self.db_conn)