def test_ssn(self): for _ in range(100): sin = self.fake.ssn() # Ensure that generated SINs are 11 characters long # including spaces, consist of spaces and digits only, and # satisfy the validation algorithm. assert len(sin) == 11 assert sin.replace(' ', '').isdigit() assert ca_checksum(sin) == int(sin[-1])
def test_ssn(self): for _ in range(100): sin = self.factory.ssn() # Ensure that generated SINs are 11 characters long # including spaces, consist of spaces and digits only, and # satisfy the validation algorithm. assert len(sin) == 11 assert sin.replace(' ', '').isdigit() assert ca_checksum(sin) == int(sin[-1])