def test_that_an_array_of_steps_is_returned(self): registration_steps_view = RegistrationStepsView() mocked_script_1 = Mock() mocked_script_1.steps.all = Mock(return_value=["first step", "second step"]) mocked_script_2 = Mock() mocked_script_2.steps.all = Mock(return_value=["third step"]) registration_steps = registration_steps_view.get_script_steps([mocked_script_1, mocked_script_2]) self.assertItemsEqual(registration_steps, ["first step", "second step", "third step"])
def test_that_an_array_of_steps_is_returned(self): registration_steps_view = RegistrationStepsView() mocked_script_1 = Mock() mocked_script_1.steps.all = Mock( return_value=["first step", "second step"]) mocked_script_2 = Mock() mocked_script_2.steps.all = Mock(return_value=["third step"]) registration_steps = registration_steps_view.get_script_steps( [mocked_script_1, mocked_script_2]) self.assertItemsEqual(registration_steps, ["first step", "second step", "third step"])