Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
87b92fa1
authored
Apr 02, 2014
by
Oláh István Gergely
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: quickfix test
parent
e374c9ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
circle/dashboard/tests/test_views.py
+10
-10
No files found.
circle/dashboard/tests/test_views.py
View file @
87b92fa1
...
@@ -638,16 +638,6 @@ class NodeDetailTest(LoginMixin, TestCase):
...
@@ -638,16 +638,6 @@ class NodeDetailTest(LoginMixin, TestCase):
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertEqual
(
Node
.
objects
.
get
(
pk
=
1
)
.
name
,
'test123'
)
self
.
assertEqual
(
Node
.
objects
.
get
(
pk
=
1
)
.
name
,
'test123'
)
def
test_unpermitted_set_name_w_ajax
(
self
):
c
=
Client
()
self
.
login
(
c
,
"user2"
)
node
=
Node
.
objects
.
get
(
pk
=
1
)
old_name
=
node
.
name
response
=
c
.
post
(
"/dashboard/node/1/"
,
{
'new_name'
:
'test12'
},
HTTP_X_REQUESTED_WITH
=
'XMLHttpRequest'
)
self
.
assertEqual
(
response
.
status_code
,
302
)
self
.
assertEqual
(
Node
.
objects
.
get
(
pk
=
1
)
.
name
,
old_name
)
def
test_unpermitted_add_trait
(
self
):
def
test_unpermitted_add_trait
(
self
):
c
=
Client
()
c
=
Client
()
self
.
login
(
c
,
"user2"
)
self
.
login
(
c
,
"user2"
)
...
@@ -755,6 +745,16 @@ class NodeDetailTest(LoginMixin, TestCase):
...
@@ -755,6 +745,16 @@ class NodeDetailTest(LoginMixin, TestCase):
self
.
assertEqual
(
response
.
status_code
,
302
)
self
.
assertEqual
(
response
.
status_code
,
302
)
self
.
assertEqual
(
node_enabled
,
not
Node
.
objects
.
get
(
pk
=
1
)
.
enabled
)
self
.
assertEqual
(
node_enabled
,
not
Node
.
objects
.
get
(
pk
=
1
)
.
enabled
)
def
test_permitted_change_node_status_w_ajax
(
self
):
c
=
Client
()
self
.
login
(
c
,
"superuser"
)
node
=
Node
.
objects
.
get
(
pk
=
1
)
node_enabled
=
node
.
enabled
response
=
c
.
post
(
"/dashboard/node/status/1/"
,
{
'change_status'
:
''
},
HTTP_X_REQUESTED_WITH
=
'XMLHttpRequest'
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertEqual
(
node_enabled
,
not
Node
.
objects
.
get
(
pk
=
1
)
.
enabled
)
class
VmDetailVncTest
(
LoginMixin
,
TestCase
):
class
VmDetailVncTest
(
LoginMixin
,
TestCase
):
fixtures
=
[
'test-vm-fixture.json'
,
'node.json'
]
fixtures
=
[
'test-vm-fixture.json'
,
'node.json'
]
...
...
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