def test_pre_update_validate_change_cmd(self):
    expected_suggestion_dict = self.suggestion_dict
    suggestion = suggestion_registry.SuggestionAddQuestion(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'], False, self.fake_date)
    change = {'cmd': question_domain.CMD_UPDATE_QUESTION_PROPERTY, 'property_name': question_domain.QUESTION_PROPERTY_LANGUAGE_CODE, 'new_value': 'bn', 'old_value': 'en'}
    with self.assertRaisesRegexp(utils.ValidationError, 'The new change cmd must be equal to create_new_fully_specified_question'):
        suggestion.pre_update_validate(question_domain.QuestionChange(change))
def test_pre_update_validate_change_cmd(self):
    expected_suggestion_dict = self.suggestion_dict
    suggestion = suggestion_registry.SuggestionAddQuestion(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'], False, self.fake_date)
    change = {'cmd': question_domain.CMD_UPDATE_QUESTION_PROPERTY, 'property_name': question_domain.QUESTION_PROPERTY_LANGUAGE_CODE, 'new_value': 'bn', 'old_value': 'en'}
    with self.assertRaisesRegexp(utils.ValidationError, 'The new change cmd must be equal to create_new_fully_specified_question'):
        suggestion.pre_update_validate(question_domain.QuestionChange(change))