'Test json response with mocked error data for sequence'

@mock.patch('xmodule.seq_module.SequenceDescriptor.index_dictionary')
def test_reindex_seq_error_json_responses(self, mock_index_dictionary):

    response = perform_search('unique', user=self.user, size=10, from_=0, course_id=unicode(self.course.id))
    self.assertEqual(response['total'], 1)
    err = Exception
    mock_index_dictionary.return_value = err
    with self.assertRaises(SearchIndexingError):
        reindex_course_and_check_access(self.course.id, self.user)
