-
Notifications
You must be signed in to change notification settings - Fork 20
Use a guaranteed invalid email in sanitize_email #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
17750da
to
14def4f
Compare
@@ -59,9 +59,9 @@ def test_sanitize_surname_en_gb(): | |||
|
|||
|
|||
def test_sanitize_email_resets_on_session_reset(): | |||
assert user.sanitize_email('[email protected]') == ( | |||
'[email protected]') | |||
assert user.sanitize_email('[email protected]') == ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can't change the source address and expect it to sanitize to same value. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah.. we had the random hash there. 👍 Will check what it gave and update the expected value. I think having different source domain helps to understand the functionality easier.
14def4f
to
5d80f0b
Compare
'[email protected]') | ||
assert user.sanitize_email(' [email protected] ') == ( | ||
'[email protected]') | ||
assert user.sanitize_email('test<@example.net') == ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you add <
to this email?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slipped I guess. 👍
TLD `.invalid` is quaranteed to be invalid by IETF RFC2606 hence it is safer than earlier `sanitized.net`, that could, in theory, have e.g. a working mail server.
5d80f0b
to
cb1cea6
Compare
TLD
.invalid
is quaranteed to be invalid by IETF RFC2606 hence it is safer than earliersanitized.net
, that could, in theory, have e.g. a working mail server.