def test_add_child(self): step = Step('foo') step2 = Step('step2') step3 = Step('step3') step.add_child(step2) step.add_child(step3) self.assertEquals(step.children, [step2, step3])
def test_insert_child(self): step = Step('foo') step2 = Step('step2') step3 = Step('step3') step4 = Step('step4') step.add_child(step2) step.add_child(step3) step.insert_child(0, step4) self.assertEquals(step.children, [step4, step2, step3])