-
Notifications
You must be signed in to change notification settings - Fork 3
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
#159054008 User Should Receive Descriptive Validation Errors. #10
Conversation
@@ -67,3 +67,44 @@ def test_username_cannot_be_register_twice(self): | |||
errors = json.loads(response.content).get("errors") | |||
self.assertEqual(errors['username'][0], "user with this username already exists.") | |||
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) | |||
|
|||
def test_password_cannot_be_lass_than_8_characters(self): |
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.
fix typo lass to less
self.assertEqual(errors['password'][0], "Password should be atleats 8 characters.") | ||
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) | ||
|
||
def test_password_Not_being_alphanumeric(self): |
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.
I think you should not capitalize words in snake_case naming convention
@dessHub are you still making changes on this PR? |
@jacksono Done updating the PR |
@dessHub from testing on my machine i have noticed that a user can register with a password is that not alphanumeric. In the example below, the password does not contain a number but the user gets registered |
@jacksono Will look into it right away. |
@jacksono I have fixed the bug. |
@dessHub , I tested it with a wrong email and got the correct error message. It works as expected |
What does this PR do?
. Implements descriptive validation error messages.
How To Manually Test?
ft-validators-159054008
branch.git pull origin ft-validators-159054008
ft-validators-159054008
branchgit checkout ft-validators-159054008
python manage.py runserver
Affected Endpoints:
POST \api\users
What are the relevant pivotal tracker stories?
#159054008 Users should receive descriptive signup/Registration validation errors