Skip to content
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

Added tests for untested code #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mark0978
Copy link

So I started looking at this module and discovered it had no tests, so I wrote some, and most of them fail because the module doesn't seem to do a great job of deailng with https://en.wikipedia.org/wiki/International_email#Email_addresses for which there has been support since 2014.

Also, it allows spaces in the username, and domains without a dot. I've not yet attempted fixing the problems yet, but figured everyone should be aware of them.

self.assertTrue(validate_email(r'[email protected]'))
self.assertTrue(validate_email(r'[email protected]'))

self.assertFalse(validate_email(r'someone@gmail'))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it pass locally for you? I'm testing it locally and this case is failing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants