- assert self.proc2.id_ is not None
- assert self.proc3.id_ is not None
- self.proc1.add_step(self.db_conn, None, self.proc2.id_, None)
+ def add_step(proc: Process,
+ steps_proc: list[tuple[int | None, int, int | None]],
+ step_tuple: tuple[int | None, int, int | None],
+ expected_id: int) -> None:
+ steps_proc += [step_tuple]
+ proc.set_steps(self.db_conn, steps_proc)
+ steps_proc[-1] = (expected_id, step_tuple[1], step_tuple[2])
+ assert isinstance(self.proc2.id_, int)
+ assert isinstance(self.proc3.id_, int)
+ steps_proc1: list[tuple[int | None, int, int | None]] = []
+ add_step(self.proc1, steps_proc1, (None, self.proc2.id_, None), 1)