def test_validate_change_question_state_data_schema_version(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)
    suggestion.validate()
    question_dict = suggestion.change.question_dict
    question_dict['question_state_data_schema_version'] = 0
    suggestion.change.question_dict = question_dict
    with self.assertRaisesRegexp(utils.ValidationError, ('Expected question state schema version to be %s, received 0' % feconf.CURRENT_STATE_SCHEMA_VERSION)):
        suggestion.validate()
def test_validate_change_question_state_data_schema_version(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)
    suggestion.validate()
    question_dict = suggestion.change.question_dict
    question_dict['question_state_data_schema_version'] = 0
    suggestion.change.question_dict = question_dict
    with self.assertRaisesRegexp(utils.ValidationError, ('Expected question state schema version to be %s, received 0' % feconf.CURRENT_STATE_SCHEMA_VERSION)):
        suggestion.validate()