Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arkindex
Backend
Merge requests
!2325
Perform password validation in UpdateUser
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Perform password validation in UpdateUser
reset-pwd-validation
into
master
Overview
0
Commits
2
Pipelines
0
Changes
1
Merged
Valentin Rigal
requested to merge
reset-pwd-validation
into
master
9 months ago
Overview
0
Commits
2
Pipelines
0
Changes
1
Expand
Closes
#1768 (closed)
0
0
Merge request reports
Viewing commit
86b1b64b
Prev
Next
Show latest version
1 file
+
16
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
86b1b64b
Add test case
· 86b1b64b
Valentin Rigal
authored
9 months ago
arkindex/users/tests/test_registration.py
+
16
−
0
Options
@@ -64,6 +64,22 @@ class TestRegistration(FixtureAPITestCase):
)
self
.
assertEqual
(
response
.
status_code
,
status
.
HTTP_200_OK
)
def
test_update_password_validation
(
self
):
self
.
client
.
force_login
(
self
.
user
)
response
=
self
.
client
.
patch
(
reverse
(
"
api:user-retrieve
"
),
data
=
{
"
password
"
:
"
email
"
},
format
=
"
json
"
,
)
self
.
assertEqual
(
response
.
status_code
,
status
.
HTTP_400_BAD_REQUEST
)
self
.
assertDictEqual
(
response
.
json
(),
{
"
password
"
:
[
"
The password is too similar to the email address.
"
,
"
This password is too short. It must contain at least 8 characters.
"
,
"
This password is too common.
"
,
]
})
def
test_update_display_name
(
self
):
self
.
client
.
force_login
(
self
.
user
)
response
=
self
.
client
.
patch
(
Loading