def test_validate_translation_suggestion_counts_fails_for_invalid_lang_code(self):
    community_contribution_stats = suggestion_services.get_community_contribution_stats()
    community_contribution_stats.set_translation_suggestion_count_for_language_code(self.invalid_language_code, 1)
    with self.assertRaisesRegexp(utils.ValidationError, ('Invalid language code for the translation suggestion counts: %s.' % self.invalid_language_code)):
        community_contribution_stats.validate()
def test_validate_translation_suggestion_counts_fails_for_invalid_lang_code(self):
    community_contribution_stats = suggestion_services.get_community_contribution_stats()
    community_contribution_stats.set_translation_suggestion_count_for_language_code(self.invalid_language_code, 1)
    with self.assertRaisesRegexp(utils.ValidationError, ('Invalid language code for the translation suggestion counts: %s.' % self.invalid_language_code)):
        community_contribution_stats.validate()