This repository has been archived by the owner on Aug 4, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
51 additions
and
66 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 |
---|---|---|
|
@@ -97,7 +97,6 @@ def test_bad_reg(self): | |
res = self.test_app.post('/', { | ||
'email': '', | ||
'nickname': '', | ||
'passwd-confirm': '', | ||
'register': True | ||
}, status=200) | ||
message = res.html.find(id='login-message') | ||
|
@@ -109,7 +108,6 @@ def test_failed_reg_empty_nick(self): | |
'email': '', | ||
'nickname': '', | ||
'password': '', | ||
'passwd-confirm': '', | ||
'register': True | ||
}, status=200) | ||
message = res.html.find(id='login-message') | ||
|
@@ -121,7 +119,6 @@ def test_failed_reg_empty_email(self): | |
'email': '', | ||
'nickname': self.user['nickname'], | ||
'password': '', | ||
'passwd-confirm': '', | ||
'register': True | ||
}, status=200) | ||
message = res.html.find(id='login-message') | ||
|
@@ -133,27 +130,24 @@ def test_failed_reg_empty_password(self): | |
'email': self.user['email'], | ||
'nickname': self.user['nickname'], | ||
'password': '', | ||
'passwd-confirm': '', | ||
'register': True | ||
}, status=200) | ||
message = res.html.find(id='login-message') | ||
self.assertIsNotNone(message) | ||
self.assertEqual(message.string, Messages.empty_password) | ||
|
||
def test_failed_reg_nick_use(self): | ||
data = copy.copy(self.user) | ||
data['register'] = True | ||
data['passwd-confirm'] = 'hi' | ||
res = self.test_app.post('/', data, status=200) | ||
self.assertIsNone(res.html.find(id='log-out')) | ||
message = res.html.find(id='login-message') | ||
self.assertIsNotNone(message) | ||
self.assertEqual(message.string, Messages.password_mismatch) | ||
# def test_failed_reg_nick_use(self): | ||
# data = copy.copy(self.user) | ||
# data['register'] = True | ||
# res = self.test_app.post('/', data, status=200) | ||
# self.assertIsNone(res.html.find(id='log-out')) | ||
# message = res.html.find(id='login-message') | ||
# self.assertIsNotNone(message) | ||
# self.assertEqual(message.string, Messages.password_mismatch) | ||
|
||
def test_reg_success(self): | ||
data = copy.copy(self.user) | ||
data['register'] = True | ||
data['passwd-confirm'] = data['password'] | ||
res = self.test_app.post('/', data, status=200) | ||
message = res.html.find(id='login-message') | ||
self.assertIsNotNone(message) | ||
|
@@ -214,7 +208,6 @@ def setUp(self): | |
FunctionalAuthTests.setUp(self) | ||
data = copy.copy(self.user) | ||
data['register'] = True | ||
data['passwd-confirm'] = data['password'] | ||
res = self.test_app.post('/', data, status=200) | ||
message = res.html.find(id='login-message') | ||
self.assertIsNotNone(message) | ||
|
@@ -333,7 +326,6 @@ def setUp(self): | |
FunctionalAuthTests.setUp(self) | ||
data = copy.copy(self.user) | ||
data['register'] = True | ||
data['passwd-confirm'] = data['password'] | ||
res = self.test_app.post('/', data, status=200) | ||
message = res.html.find(id='login-message') | ||
self.assertIsNotNone(message) | ||
|
@@ -349,7 +341,6 @@ def test_failed_reg_nick_use(self): | |
'nickname': 'root', | ||
'email': 'asd', | ||
'password': '...', | ||
'passwd-confirm': '...', | ||
'register': True | ||
}, status=200) | ||
self.assertIsNone(res.html.find(id='log-out')) | ||
|
@@ -362,7 +353,6 @@ def test_failed_reg_email_use(self): | |
'nickname': 'root2', | ||
'email': '[email protected]', | ||
'password': '...', | ||
'passwd-confirm': '...', | ||
'register': True | ||
}, status=200) | ||
self.assertIsNone(res.html.find(id='log-out')) | ||
|
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import json | ||
|
||
|
||
VERSION = '0.7.0' | ||
VERSION = '0.7.1' | ||
|
||
|
||
def parse_search_phrase(s): | ||
|
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
7aaf1bf
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.
Убрать параметр passwd-confirm из /auth?register=