Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gyuricska Milán
/
cloud
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
bfe56c97
authored
Jul 31, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix tests
parent
ce8fd522
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
circle/dashboard/fixtures/test-vm-fixture.json
+3
-3
circle/dashboard/tests/test_views.py
+4
-2
No files found.
circle/dashboard/fixtures/test-vm-fixture.json
View file @
bfe56c97
...
@@ -1382,7 +1382,7 @@
...
@@ -1382,7 +1382,7 @@
"pw"
:
"ads"
,
"pw"
:
"ads"
,
"time_of_suspend"
:
null
,
"time_of_suspend"
:
null
,
"ram_size"
:
200
,
"ram_size"
:
200
,
"priority"
:
4
,
"priority"
:
10
,
"active_since"
:
null
,
"active_since"
:
null
,
"template"
:
null
,
"template"
:
null
,
"access_method"
:
"nx"
,
"access_method"
:
"nx"
,
...
@@ -1412,7 +1412,7 @@
...
@@ -1412,7 +1412,7 @@
"pw"
:
"ads"
,
"pw"
:
"ads"
,
"time_of_suspend"
:
null
,
"time_of_suspend"
:
null
,
"ram_size"
:
200
,
"ram_size"
:
200
,
"priority"
:
4
,
"priority"
:
10
,
"active_since"
:
null
,
"active_since"
:
null
,
"template"
:
null
,
"template"
:
null
,
"access_method"
:
"nx"
,
"access_method"
:
"nx"
,
...
@@ -1518,7 +1518,7 @@
...
@@ -1518,7 +1518,7 @@
"ram_size"
:
1024
,
"ram_size"
:
1024
,
"modified"
:
"2014-01-24T00:58:19.654Z"
,
"modified"
:
"2014-01-24T00:58:19.654Z"
,
"system"
:
"bubuntu"
,
"system"
:
"bubuntu"
,
"priority"
:
2
0
,
"priority"
:
1
0
,
"access_method"
:
"ssh"
,
"access_method"
:
"ssh"
,
"raw_data"
:
""
,
"raw_data"
:
""
,
"arch"
:
"x86_64"
,
"arch"
:
"x86_64"
,
...
...
circle/dashboard/tests/test_views.py
View file @
bfe56c97
...
@@ -304,10 +304,12 @@ class VmDetailTest(LoginMixin, TestCase):
...
@@ -304,10 +304,12 @@ class VmDetailTest(LoginMixin, TestCase):
c
=
Client
()
c
=
Client
()
self
.
login
(
c
,
'superuser'
)
self
.
login
(
c
,
'superuser'
)
kwargs
=
InstanceTemplate
.
objects
.
get
(
id
=
1
)
.
__dict__
.
copy
()
kwargs
=
InstanceTemplate
.
objects
.
get
(
id
=
1
)
.
__dict__
.
copy
()
kwargs
.
update
(
name
=
't2'
,
lease
=
1
,
disks
=
1
,
raw_data
=
'tst2'
)
kwargs
.
update
(
name
=
't2'
,
lease
=
1
,
disks
=
1
,
raw_data
=
'<devices></devices>'
)
response
=
c
.
post
(
'/dashboard/template/1/'
,
kwargs
)
response
=
c
.
post
(
'/dashboard/template/1/'
,
kwargs
)
self
.
assertEqual
(
response
.
status_code
,
302
)
self
.
assertEqual
(
response
.
status_code
,
302
)
self
.
assertEqual
(
InstanceTemplate
.
objects
.
get
(
id
=
1
)
.
raw_data
,
'tst2'
)
self
.
assertEqual
(
InstanceTemplate
.
objects
.
get
(
id
=
1
)
.
raw_data
,
"<devices></devices>"
)
def
test_permitted_lease_delete_w_template_using_it
(
self
):
def
test_permitted_lease_delete_w_template_using_it
(
self
):
c
=
Client
()
c
=
Client
()
...
...
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