Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mentors.debian.net
debexpo
Commits
e5a384dd
Verified
Commit
e5a384dd
authored
Jan 06, 2022
by
Baptiste Beauplat
Browse files
Add a test to cover password change failure
parent
30820466
Changes
1
Show whitespace changes
Inline
Side-by-side
tests/functional/accounts/test_profile.py
View file @
e5a384dd
...
@@ -446,6 +446,16 @@ psCWDYcNhNTEmXgsDSqUlLrqqde/3hDynhWeAP9jk7QAnDToELBdyCe6HpGXLC3q
...
@@ -446,6 +446,16 @@ psCWDYcNhNTEmXgsDSqUlLrqqde/3hDynhWeAP9jk7QAnDToELBdyCe6HpGXLC3q
# Login
# Login
self
.
client
.
post
(
reverse
(
'login'
),
self
.
_AUTHDATA
)
self
.
client
.
post
(
reverse
(
'login'
),
self
.
_AUTHDATA
)
# Test password change, failed
response
=
self
.
client
.
post
(
reverse
(
'profile'
),
{
'old_password'
:
'not-my-password'
,
'new_password1'
:
'newpassword'
,
'new_password2'
:
'newpassword'
,
'commit_password'
:
'submit'
})
self
.
assertEquals
(
response
.
status_code
,
200
)
self
.
assertIn
(
'errorlist'
,
str
(
response
.
content
))
# Test password change
# Test password change
response
=
self
.
client
.
post
(
reverse
(
'profile'
),
{
response
=
self
.
client
.
post
(
reverse
(
'profile'
),
{
'old_password'
:
'password'
,
'old_password'
:
'password'
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment