def test_get_output_for_user_exception(self): # GIVEN answer_to_question = "z" # WHEN expected = "Error message: name 'z' is not defined" actual = get_output_for_user(answer_to_question, self.real_question_3) # THEN self.assertEqual(expected, actual)
def test_get_output_for_user_none(self): # GIVEN answer_to_question = None # WHEN expected = None actual = get_output_for_user(answer_to_question, self.real_question_3) # THEN self.assertEqual(expected, actual)
def test_get_output_for_user(self): # GIVEN answer_to_question = "shoes * 5" # WHEN expected = "['sneakers', 'heels', 'flip-flops', 'sneakers', 'heels', 'flip-flops', 'sneakers', 'heels', 'flip-flops', 'sneakers', 'heels', 'flip-flops', 'sneakers', 'heels', 'flip-flops']" actual = get_output_for_user(answer_to_question, self.real_question_3) # THEN self.assertEqual(expected, actual)