def test_fpe_t_four(): generator = get_alias_generator(AliasGeneratorType.FPE_T_FOUR) value = '4444333322221111' result = generator.generate(value) assert result != value assert result[-4:] == '1111' assert check_luhn(result)
def test_non_luhn_fpe_alphanumeric(): generator = get_alias_generator(AliasGeneratorType.NON_LUHN_FPE_ALPHANUMERIC) value = '4444333322221111' result = generator.generate(value) assert result != value assert result.isdigit() assert len(result) == len(value) assert not check_luhn(result)
def test_pfpt(): generator = get_alias_generator(AliasGeneratorType.PFPT) value = '4444333322221111' result = generator.generate(value) assert result != value assert len(result) == 19 assert result[0:5] == '99144' assert result[-4:] == '1111' assert check_luhn(result)