-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #139 from maxmind/ugexe/email-nfc
Normalize email addresses to NFC
- Loading branch information
Showing
3 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,6 +141,26 @@ def test_maybe_hash_email(self): | |
} | ||
}, | ||
}, | ||
{ | ||
"name": "email local part nfc normalization form 1", | ||
"input": {"email": {"address": "bu\u0308[email protected]"}}, | ||
"expected": { | ||
"email": { | ||
"address": "53550c712b146287a2d0dd30e5ed6f4b", | ||
"domain": "example.com", | ||
} | ||
}, | ||
}, | ||
{ | ||
"name": "email local part nfc normalization form 2", | ||
"input": {"email": {"address": "b\u00FC[email protected]"}}, | ||
"expected": { | ||
"email": { | ||
"address": "53550c712b146287a2d0dd30e5ed6f4b", | ||
"domain": "example.com", | ||
} | ||
}, | ||
}, | ||
] | ||
|
||
for test in tests: | ||
|
@@ -231,6 +251,8 @@ def test_clean_email(): | |
{"input": "[email protected]", "output": "[email protected]"}, | ||
{"input": "[email protected].", "output": "[email protected]"}, | ||
{"input": "[email protected]...", "output": "[email protected]"}, | ||
{"input": "example@bu\u0308cher.com", "output": "[email protected]"}, | ||
{"input": "example@b\u00FCcher.com", "output": "[email protected]"}, | ||
] | ||
|
||
for test in tests: | ||
|