p_1.add_step(self.db_conn, None, p_2.id_, None)
p_1_dict: dict[int, dict[str, Any]] = {1: {
'process': p_2, 'parent_id': None,
p_1.add_step(self.db_conn, None, p_2.id_, None)
p_1_dict: dict[int, dict[str, Any]] = {1: {
'process': p_2, 'parent_id': None,
}}
self.assertEqual(p_1.get_steps(self.db_conn, None), p_1_dict)
s_b = p_1.add_step(self.db_conn, None, p_3.id_, None)
p_1_dict[2] = {
'process': p_3, 'parent_id': None,
}}
self.assertEqual(p_1.get_steps(self.db_conn, None), p_1_dict)
s_b = p_1.add_step(self.db_conn, None, p_3.id_, None)
p_1_dict[2] = {
'process': p_3, 'parent_id': None,
}
self.assertEqual(p_1.get_steps(self.db_conn, None), p_1_dict)
s_c = p_2.add_step(self.db_conn, None, p_3.id_, None)
assert s_c.id_ is not None
p_1_dict[1]['steps'] = {3: {
'process': p_3, 'parent_id': None,
}
self.assertEqual(p_1.get_steps(self.db_conn, None), p_1_dict)
s_c = p_2.add_step(self.db_conn, None, p_3.id_, None)
assert s_c.id_ is not None
p_1_dict[1]['steps'] = {3: {
'process': p_3, 'parent_id': None,
}}
self.assertEqual(p_1.get_steps(self.db_conn, None), p_1_dict)
p_1.add_step(self.db_conn, None, p_2.id_, s_b.id_)
p_1_dict[2]['steps'][4] = {
}}
self.assertEqual(p_1.get_steps(self.db_conn, None), p_1_dict)
p_1.add_step(self.db_conn, None, p_2.id_, s_b.id_)
p_1_dict[2]['steps'][4] = {
'is_explicit': True, 'steps': {3: {
'process': p_3, 'parent_id': None,
'is_explicit': True, 'steps': {3: {
'process': p_3, 'parent_id': None,
}}}
self.assertEqual(p_1.get_steps(self.db_conn, None), p_1_dict)
p_1.add_step(self.db_conn, None, p_3.id_, 999)
p_1_dict[5] = {
'process': p_3, 'parent_id': None,
}}}
self.assertEqual(p_1.get_steps(self.db_conn, None), p_1_dict)
p_1.add_step(self.db_conn, None, p_3.id_, 999)
p_1_dict[5] = {
'process': p_3, 'parent_id': None,
}
self.assertEqual(p_1.get_steps(self.db_conn, None), p_1_dict)
p_1.add_step(self.db_conn, None, p_3.id_, 3)
p_1_dict[6] = {
'process': p_3, 'parent_id': None,
}
self.assertEqual(p_1.get_steps(self.db_conn, None), p_1_dict)
p_1.add_step(self.db_conn, None, p_3.id_, 3)
p_1_dict[6] = {
'process': p_3, 'parent_id': None,