'Check that an exception given in `Progress` produces a `log.exception` call.'

@patch('xmodule.capa_base.log')
@patch('xmodule.capa_base.Progress')
def test_get_progress_error(self, mock_progress, mock_log):

    error_types = [TypeError, ValueError]
    for error_type in error_types:
        mock_progress.side_effect = error_type
        module = CapaFactory.create()
        self.assertIsNone(module.get_progress())
        mock_log.exception.assert_called_once_with('Got    bad    progress')
        mock_log.reset_mock()
