def test_convert_html_in_suggestion_change(self):
    html_content = '<p>Value</p><oppia-noninteractive-math raw_latex-with-value="&amp;quot;+,-,-,+&amp;quot;"></oppia-noninteractive-math>'
    expected_html_content = '<p>Value</p><oppia-noninteractive-math math_content-with-value="{&amp;quot;raw_latex&amp;quot;: &amp;quot;+,-,-,+&amp;quot;, &amp;quot;svg_filename&amp;quot;: &amp;quot;&amp;quot;}"></oppia-noninteractive-math>'
    answer_group = {'outcome': {'dest': None, 'feedback': {'content_id': 'feedback_1', 'html': ''}, 'labelled_as_correct': True, 'param_changes': [], 'refresher_exploration_id': None, 'missing_prerequisite_skill_id': None}, 'rule_specs': [{'inputs': {'x': 0}, 'rule_type': 'Equals'}], 'training_data': [], 'tagged_skill_misconception_id': None}
    question_state_dict = {'content': {'content_id': 'content_1', 'html': html_content}, 'recorded_voiceovers': {'voiceovers_mapping': {'content_1': {}, 'feedback_1': {}, 'feedback_2': {}, 'hint_1': {}, 'solution': {}}}, 'written_translations': {'translations_mapping': {'content_1': {}, 'feedback_1': {}, 'feedback_2': {}, 'hint_1': {}, 'solution': {}}}, 'interaction': {'answer_groups': [answer_group], 'confirmed_unclassified_answers': [], 'customization_args': {'choices': {'value': [{'html': 'option 1', 'content_id': 'ca_choices_0'}]}, 'showChoicesInShuffledOrder': {'value': True}}, 'default_outcome': {'dest': None, 'feedback': {'content_id': 'feedback_2', 'html': 'Correct Answer'}, 'param_changes': [], 'refresher_exploration_id': None, 'labelled_as_correct': True, 'missing_prerequisite_skill_id': None}, 'hints': [{'hint_content': {'content_id': 'hint_1', 'html': 'Hint 1'}}], 'solution': {'answer_is_exclusive': False, 'correct_answer': 0, 'explanation': {'content_id': 'solution', 'html': '<p>This is a solution.</p>'}}, 'id': 'MultipleChoiceInput'}, 'param_changes': [], 'solicit_answer_details': False, 'classifier_model_id': None}
    suggestion_dict = {'suggestion_id': 'skill1.thread1', 'suggestion_type': feconf.SUGGESTION_TYPE_ADD_QUESTION, 'target_type': feconf.ENTITY_TYPE_SKILL, 'target_id': 'skill1', 'target_version_at_submission': 1, 'status': suggestion_models.STATUS_ACCEPTED, 'author_name': 'author', 'final_reviewer_id': self.reviewer_id, 'change': {'cmd': question_domain.CMD_CREATE_NEW_FULLY_SPECIFIED_QUESTION, 'question_dict': {'question_state_data': question_state_dict, 'language_code': 'en', 'question_state_data_schema_version': feconf.CURRENT_STATE_SCHEMA_VERSION, 'linked_skill_ids': ['skill_1'], 'inapplicable_skill_misconception_ids': ['skillid12345-1']}, 'skill_id': 'skill_1', 'skill_difficulty': 0.3}, 'score_category': 'question.skill1', 'language_code': 'en', 'last_updated': utils.get_time_in_millisecs(self.fake_date)}
    suggestion = suggestion_registry.SuggestionAddQuestion(suggestion_dict['suggestion_id'], suggestion_dict['target_id'], suggestion_dict['target_version_at_submission'], suggestion_dict['status'], self.author_id, self.reviewer_id, suggestion_dict['change'], suggestion_dict['score_category'], suggestion_dict['language_code'], False, self.fake_date)
    suggestion.convert_html_in_suggestion_change(html_validation_service.add_math_content_to_math_rte_components)
    self.assertEqual(suggestion.change.question_dict['question_state_data']['content']['html'], expected_html_content)
def test_convert_html_in_suggestion_change(self):
    html_content = '<p>Value</p><oppia-noninteractive-math raw_latex-with-value="&amp;quot;+,-,-,+&amp;quot;"></oppia-noninteractive-math>'
    expected_html_content = '<p>Value</p><oppia-noninteractive-math math_content-with-value="{&amp;quot;raw_latex&amp;quot;: &amp;quot;+,-,-,+&amp;quot;, &amp;quot;svg_filename&amp;quot;: &amp;quot;&amp;quot;}"></oppia-noninteractive-math>'
    answer_group = {'outcome': {'dest': None, 'feedback': {'content_id': 'feedback_1', 'html': }, 'labelled_as_correct': True, 'param_changes': [], 'refresher_exploration_id': None, 'missing_prerequisite_skill_id': None}, 'rule_specs': [{'inputs': {'x': 0}, 'rule_type': 'Equals'}], 'training_data': [], 'tagged_skill_misconception_id': None}
    question_state_dict = {'content': {'content_id': 'content_1', 'html': html_content}, 'recorded_voiceovers': {'voiceovers_mapping': {'content_1': {}, 'feedback_1': {}, 'feedback_2': {}, 'hint_1': {}, 'solution': {}}}, 'written_translations': {'translations_mapping': {'content_1': {}, 'feedback_1': {}, 'feedback_2': {}, 'hint_1': {}, 'solution': {}}}, 'interaction': {'answer_groups': [answer_group], 'confirmed_unclassified_answers': [], 'customization_args': {'choices': {'value': [{'html': 'option 1', 'content_id': 'ca_choices_0'}]}, 'showChoicesInShuffledOrder': {'value': True}}, 'default_outcome': {'dest': None, 'feedback': {'content_id': 'feedback_2', 'html': 'Correct Answer'}, 'param_changes': [], 'refresher_exploration_id': None, 'labelled_as_correct': True, 'missing_prerequisite_skill_id': None}, 'hints': [{'hint_content': {'content_id': 'hint_1', 'html': 'Hint 1'}}], 'solution': {'answer_is_exclusive': False, 'correct_answer': 0, 'explanation': {'content_id': 'solution', 'html': '<p>This is a solution.</p>'}}, 'id': 'MultipleChoiceInput'}, 'param_changes': [], 'solicit_answer_details': False, 'classifier_model_id': None}
    suggestion_dict = {'suggestion_id': 'skill1.thread1', 'suggestion_type': feconf.SUGGESTION_TYPE_ADD_QUESTION, 'target_type': feconf.ENTITY_TYPE_SKILL, 'target_id': 'skill1', 'target_version_at_submission': 1, 'status': suggestion_models.STATUS_ACCEPTED, 'author_name': 'author', 'final_reviewer_id': self.reviewer_id, 'change': {'cmd': question_domain.CMD_CREATE_NEW_FULLY_SPECIFIED_QUESTION, 'question_dict': {'question_state_data': question_state_dict, 'language_code': 'en', 'question_state_data_schema_version': feconf.CURRENT_STATE_SCHEMA_VERSION, 'linked_skill_ids': ['skill_1'], 'inapplicable_skill_misconception_ids': ['skillid12345-1']}, 'skill_id': 'skill_1', 'skill_difficulty': 0.3}, 'score_category': 'question.skill1', 'language_code': 'en', 'last_updated': utils.get_time_in_millisecs(self.fake_date)}
    suggestion = suggestion_registry.SuggestionAddQuestion(suggestion_dict['suggestion_id'], suggestion_dict['target_id'], suggestion_dict['target_version_at_submission'], suggestion_dict['status'], self.author_id, self.reviewer_id, suggestion_dict['change'], suggestion_dict['score_category'], suggestion_dict['language_code'], False, self.fake_date)
    suggestion.convert_html_in_suggestion_change(html_validation_service.add_math_content_to_math_rte_components)
    self.assertEqual(suggestion.change.question_dict['question_state_data']['content']['html'], expected_html_content)