示例#1
0
    def test_new_strategy_hint__no_cleared(self):
        test_ui = UI()
        test_ui.recently_cleared = []
        mock_person = Mock()
        mock_person.name = 'Joe'
        test_ui.current_person = mock_person

        result = test_ui._new_strategy_hint()
        expected_hint = ('Please provide a new strategy for Joe.\n')
        self.assertEqual(result, expected_hint)
示例#2
0
    def test_new_strategy_hint__many_cleared(self):
        test_ui = UI()
        test_ui.recently_cleared = ['Credit Card', 'Car Loan', 'Overdraft']
        mock_person = Mock()
        mock_person.name = 'Joe'
        test_ui.current_person = mock_person

        result = test_ui._new_strategy_hint()
        expected_hint = (
            'Joe has paid off Credit Card, Car Loan and Overdraft. Please provide a new strategy for them.\n'
        )
        self.assertEqual(result, expected_hint)