Ejemplo n.º 1
0
 def test_cnpj_second_check_digit_false(self):
     correct_second_digit = '2'
     updated_cnpj_number = self.first_part_cnpj_number + \
         calc.first_check_digit(
             self.first_part_cnpj_number, self.first_cnpj_weighs)
     self.assertNotEqual(correct_second_digit,
                         calc.second_check_digit(updated_cnpj_number, self.second_cnpj_weighs))
Ejemplo n.º 2
0
 def test_cpf_second_check_digit_false(self):
     updated_cpf_number = self.first_part_cpf_number + \
         calc.first_check_digit(
             self.first_part_cpf_number, self.first_cpf_weighs)
     incorrect_second_digit = '7'
     self.assertNotEqual(incorrect_second_digit,
                         calc.second_check_digit(updated_cpf_number, self.second_cpf_weighs))
Ejemplo n.º 3
0
 def test_cpf_second_check_digit_true(self):
     updated_cpf_number = self.first_part_cpf_number + \
         calc.first_check_digit(
             self.first_part_cpf_number, self.first_cpf_weighs)
     correct_second_digit = '5'
     self.assertEqual(correct_second_digit,
                      calc.second_check_digit(updated_cpf_number, self.second_cpf_weighs))
Ejemplo n.º 4
0
 def test_cnpj_first_check_digit_false(self):
     correct_first_digit = '7'
     self.assertNotEqual(correct_first_digit,
                         calc.first_check_digit(self.first_part_cnpj_number, self.first_cnpj_weighs))
Ejemplo n.º 5
0
 def test_cpf_first_check_digit_false(self):
     incorrect_first_digit = '6'
     self.assertNotEqual(incorrect_first_digit,
                         calc.first_check_digit(self.first_part_cpf_number, self.first_cpf_weighs))
Ejemplo n.º 6
0
 def test_cpf_first_check_digit_true(self):
     correct_first_digit = '3'
     self.assertEqual(correct_first_digit,
                      calc.first_check_digit(self.first_part_cpf_number, self.first_cpf_weighs))