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
b9bd7652
authored
Jul 15, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix tests
parent
76da6860
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
circle/dashboard/fixtures/test-vm-fixture.json
+1
-0
circle/dashboard/tests/test_views.py
+4
-0
No files found.
circle/dashboard/fixtures/test-vm-fixture.json
View file @
b9bd7652
...
@@ -1395,6 +1395,7 @@
...
@@ -1395,6 +1395,7 @@
"raw_data"
:
""
,
"raw_data"
:
""
,
"vnc_port"
:
1234
,
"vnc_port"
:
1234
,
"num_cores"
:
2
,
"num_cores"
:
2
,
"status"
:
"RUNNING"
,
"modified"
:
"2013-10-14T07:27:38.192Z"
"modified"
:
"2013-10-14T07:27:38.192Z"
}
}
},
},
...
...
circle/dashboard/tests/test_views.py
View file @
b9bd7652
...
@@ -199,6 +199,8 @@ class VmDetailTest(LoginMixin, TestCase):
...
@@ -199,6 +199,8 @@ class VmDetailTest(LoginMixin, TestCase):
inst
=
Instance
.
objects
.
get
(
pk
=
1
)
inst
=
Instance
.
objects
.
get
(
pk
=
1
)
inst
.
set_level
(
self
.
u1
,
'owner'
)
inst
.
set_level
(
self
.
u1
,
'owner'
)
inst
.
add_interface
(
vlan
=
Vlan
.
objects
.
get
(
pk
=
1
),
user
=
self
.
us
)
inst
.
add_interface
(
vlan
=
Vlan
.
objects
.
get
(
pk
=
1
),
user
=
self
.
us
)
inst
.
status
=
'RUNNING'
inst
.
save
()
iface_count
=
inst
.
interface_set
.
count
()
iface_count
=
inst
.
interface_set
.
count
()
c
.
post
(
"/dashboard/interface/1/delete/"
)
c
.
post
(
"/dashboard/interface/1/delete/"
)
...
@@ -211,6 +213,8 @@ class VmDetailTest(LoginMixin, TestCase):
...
@@ -211,6 +213,8 @@ class VmDetailTest(LoginMixin, TestCase):
inst
.
set_level
(
self
.
u1
,
'owner'
)
inst
.
set_level
(
self
.
u1
,
'owner'
)
vlan
=
Vlan
.
objects
.
get
(
pk
=
1
)
vlan
=
Vlan
.
objects
.
get
(
pk
=
1
)
inst
.
add_interface
(
vlan
=
vlan
,
user
=
self
.
us
)
inst
.
add_interface
(
vlan
=
vlan
,
user
=
self
.
us
)
inst
.
status
=
'RUNNING'
inst
.
save
()
iface_count
=
inst
.
interface_set
.
count
()
iface_count
=
inst
.
interface_set
.
count
()
response
=
c
.
post
(
"/dashboard/interface/1/delete/"
,
response
=
c
.
post
(
"/dashboard/interface/1/delete/"
,
...
...
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