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
6f5d8cc0
authored
Jul 22, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix tests
parent
dac4d7b7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
4 deletions
+0
-4
circle/dashboard/tests/test_views.py
+0
-4
No files found.
circle/dashboard/tests/test_views.py
View file @
6f5d8cc0
...
...
@@ -249,7 +249,6 @@ class VmDetailTest(LoginMixin, TestCase):
def
test_use_unpermitted_template
(
self
):
c
=
Client
()
self
.
login
(
c
,
'user1'
)
Disk
.
objects
.
get
(
id
=
1
)
.
set_level
(
self
.
u1
,
'user'
)
Vlan
.
objects
.
get
(
id
=
1
)
.
set_level
(
self
.
u1
,
'user'
)
response
=
c
.
post
(
'/dashboard/vm/create/'
,
{
'template'
:
1
,
...
...
@@ -261,7 +260,6 @@ class VmDetailTest(LoginMixin, TestCase):
def
test_use_permitted_template
(
self
):
c
=
Client
()
self
.
login
(
c
,
'user1'
)
Disk
.
objects
.
get
(
id
=
1
)
.
set_level
(
self
.
u1
,
'user'
)
InstanceTemplate
.
objects
.
get
(
id
=
1
)
.
set_level
(
self
.
u1
,
'user'
)
Vlan
.
objects
.
get
(
id
=
1
)
.
set_level
(
self
.
u1
,
'user'
)
response
=
c
.
post
(
'/dashboard/vm/create/'
,
...
...
@@ -293,7 +291,6 @@ class VmDetailTest(LoginMixin, TestCase):
self
.
login
(
c
,
'user1'
)
tmpl
=
InstanceTemplate
.
objects
.
get
(
id
=
1
)
tmpl
.
set_level
(
self
.
u1
,
'owner'
)
tmpl
.
disks
.
get
()
.
set_level
(
self
.
u1
,
'owner'
)
Vlan
.
objects
.
get
(
id
=
1
)
.
set_level
(
self
.
u1
,
'user'
)
kwargs
=
tmpl
.
__dict__
.
copy
()
kwargs
.
update
(
name
=
't1'
,
lease
=
1
,
disks
=
1
,
raw_data
=
'tst1'
)
...
...
@@ -593,7 +590,6 @@ class VmDetailTest(LoginMixin, TestCase):
'template'
:
1
,
'cpu_priority'
:
1
,
'cpu_count'
:
1
,
'ram_size'
:
1
,
'network'
:
[],
'disks'
:
[
Disk
.
objects
.
get
(
id
=
1
)
.
pk
],
})
self
.
assertEqual
(
response
.
status_code
,
302
)
...
...
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