def test_pre_update_validate_change_language_code(self):
    expected_suggestion_dict = self.suggestion_dict
    suggestion = suggestion_registry.SuggestionTranslateContent(expected_suggestion_dict['suggestion_id'], expected_suggestion_dict['target_id'], expected_suggestion_dict['target_version_at_submission'], expected_suggestion_dict['status'], self.author_id, self.reviewer_id, expected_suggestion_dict['change'], expected_suggestion_dict['score_category'], expected_suggestion_dict['language_code'], self.fake_date)
    change = {'cmd': exp_domain.CMD_ADD_WRITTEN_TRANSLATION, 'state_name': 'Introduction', 'content_id': 'content', 'language_code': 'en', 'content_html': '<p>This is a content.</p>', 'translation_html': '<p>This is the updated translated html.</p>', 'data_format': 'html'}
    with self.assertRaisesRegexp(utils.ValidationError, 'The language code must be equal to hi'):
        suggestion.pre_update_validate(exp_domain.ExplorationChange(change))
def test_pre_update_validate_change_language_code(self):
    expected_suggestion_dict = self.suggestion_dict
    suggestion = suggestion_registry.SuggestionTranslateContent(expected_suggestion_dict['suggestion_id'], expected_suggestion_dict['target_id'], expected_suggestion_dict['target_version_at_submission'], expected_suggestion_dict['status'], self.author_id, self.reviewer_id, expected_suggestion_dict['change'], expected_suggestion_dict['score_category'], expected_suggestion_dict['language_code'], self.fake_date)
    change = {'cmd': exp_domain.CMD_ADD_WRITTEN_TRANSLATION, 'state_name': 'Introduction', 'content_id': 'content', 'language_code': 'en', 'content_html': '<p>This is a content.</p>', 'translation_html': '<p>This is the updated translated html.</p>', 'data_format': 'html'}
    with self.assertRaisesRegexp(utils.ValidationError, 'The language code must be equal to hi'):
        suggestion.pre_update_validate(exp_domain.ExplorationChange(change))