def test_escrita_campo_num_int(self):
        # aceitar somente inteiros (int e long)
        with self.assertRaises(errors.TipoError):
            self.header_arquivo.controle_banco = 10.0
        with self.assertRaises(errors.TipoError):
            self.header_arquivo.controle_banco = ''

        # verifica se o numero de digitos esta sendo verificado
        with self.assertRaises(errors.NumDigitosExcedidoError):
            self.header_arquivo.controle_banco = 12345678234567890234567890
        with self.assertRaises(errors.NumDigitosExcedidoError):
            self.header_arquivo.controle_banco = 1234

        # verifica valor armazenado
        self.header_arquivo.controle_banco = 5
        self.assertEqual(self.header_arquivo.controle_banco, 5)
def test_initial_object_with_valid_arguments_has_correct_properties(self):
        community_contribution_stats = (
            suggestion_registry.CommunityContributionStats(
                self.translation_reviewer_counts_by_lang_code,
                self.translation_suggestion_counts_by_lang_code,
                self.question_reviewer_count,
                self.question_suggestion_count
            )
        )
        community_contribution_stats.validate()

        self.assertEqual(
            (
                community_contribution_stats
                .translation_reviewer_counts_by_lang_code
            ),
            self.translation_reviewer_counts_by_lang_code)
        self.assertEqual(
            (
                community_contribution_stats
                .translation_suggestion_counts_by_lang_code
            ),
            self.translation_suggestion_counts_by_lang_code
        )
        self.assertEqual(
            community_contribution_stats.question_reviewer_count,
            self.question_reviewer_count
        )
        self.assertEqual(
            community_contribution_stats.question_suggestion_count,
            self.question_suggestion_count
        )