def test_validate_masked_unicode_cpf_false(self): self.assertFalse(cpf.validate(u'111.444.777-38'))
def test_validate_cpf_unicode_false(self): self.assertFalse(cpf.validate(u'11144477736'))
def test_validate_masked_unicode_cpf_true(self): self.assertTrue(cpf.validate(u'111.444.777-35'))
def test_validate_cpf_with_same_numbers(self): for i in range(10): self.assertFalse(cpf.validate('{0}'.format(i) * 11))
def test_validate_cpf_unicode_true(self): self.assertTrue(cpf.validate(u'11144477735'))
def test_validate_masked_cpf_false(self): self.assertFalse(cpf.validate(self.masked_invalid_cpf))
def test_validate_cpf_false(self): self.assertFalse(cpf.validate(self.invalid_cpf))
def test_validate_masked_cpf_true(self): self.assertTrue(cpf.validate(self.masked_valid_cpf))
def test_cpf_no_masked_valid_true(self): """Test that CPF without masked is valid""" cpf_result = (self.cpf_mask_valid.replace( ".", "")).replace("-", "") self.assertTrue(cpf.validate(cpf_result))
def test_cpf_masked_valid_true(self): """Test that CPF masked valid is true""" self.assertTrue(cpf.validate(self.cpf_mask_valid))