Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4075d7a1
authored
Jul 25, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix tests
parent
44d1a2a7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
14 deletions
+1
-14
circle/dashboard/tests/test_views.py
+1
-14
No files found.
circle/dashboard/tests/test_views.py
View file @
4075d7a1
...
...
@@ -142,26 +142,13 @@ class VmDetailTest(LoginMixin, TestCase):
response
=
c
.
post
(
'/dashboard/vm/mass-delete/'
,
{
'vms'
:
[
1
]})
self
.
assertEqual
(
response
.
status_code
,
302
)
def
test_permitted_password_change
(
self
):
c
=
Client
()
self
.
login
(
c
,
"user2"
)
inst
=
Instance
.
objects
.
get
(
pk
=
1
)
inst
.
set_level
(
self
.
u2
,
'owner'
)
inst
.
node
=
Node
.
objects
.
all
()[
0
]
inst
.
save
()
password
=
inst
.
pw
response
=
c
.
post
(
"/dashboard/vm/1/"
,
{
'change_password'
:
True
})
self
.
assertTrue
(
Instance
.
get_remote_queue_name
.
called
)
self
.
assertEqual
(
response
.
status_code
,
302
)
self
.
assertNotEqual
(
password
,
Instance
.
objects
.
get
(
pk
=
1
)
.
pw
)
def
test_unpermitted_password_change
(
self
):
c
=
Client
()
self
.
login
(
c
,
"user2"
)
inst
=
Instance
.
objects
.
get
(
pk
=
1
)
inst
.
set_level
(
self
.
u1
,
'owner'
)
password
=
inst
.
pw
response
=
c
.
post
(
"/dashboard/vm/1/
"
,
{
'change_password'
:
True
}
)
response
=
c
.
post
(
"/dashboard/vm/1/
op/password_reset/"
)
self
.
assertEqual
(
response
.
status_code
,
403
)
self
.
assertEqual
(
password
,
Instance
.
objects
.
get
(
pk
=
1
)
.
pw
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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