This repository has been archived by the owner on Oct 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 403
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
username url regex compile with plus
url unittest depricated except with comma
- Loading branch information
Showing
2 changed files
with
34 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from django.test import TestCase | ||
from django.core.urlresolvers import reverse, NoReverseMatch | ||
|
||
|
||
class UserenaUrlsTests(TestCase): | ||
""" Test url resolve """ | ||
|
||
def test_resolve_email_with_plus_url(self): | ||
username = 'foo+bar@example.com' | ||
test_urls = [ | ||
'userena_signup_complete', | ||
'userena_email_change', | ||
'userena_email_change_complete', | ||
'userena_email_confirm_complete', | ||
'userena_disabled', | ||
'userena_password_change', | ||
'userena_password_change_complete', | ||
'userena_profile_edit', | ||
'userena_profile_detail', | ||
] | ||
for url_name in test_urls: | ||
try: | ||
reverse(url_name, kwargs={'username': username}) | ||
except NoReverseMatch as ex: | ||
self.failed(ex) |
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