Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
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
bb10645f
authored
Jun 13, 2014
by
Guba Sándor
Committed by
Őry Máté
Jun 13, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: removed disk_add tests
parent
4f3bb048
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
33 deletions
+1
-33
circle/dashboard/tests/test_views.py
+1
-33
No files found.
circle/dashboard/tests/test_views.py
View file @
bb10645f
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
import
json
import
json
from
unittest
import
skip
#
from unittest import skip
from
django.test
import
TestCase
from
django.test
import
TestCase
from
django.test.client
import
Client
from
django.test.client
import
Client
from
django.contrib.auth.models
import
User
,
Group
from
django.contrib.auth.models
import
User
,
Group
...
@@ -333,38 +333,6 @@ class VmDetailTest(LoginMixin, TestCase):
...
@@ -333,38 +333,6 @@ class VmDetailTest(LoginMixin, TestCase):
self
.
assertEqual
(
response
.
status_code
,
302
)
self
.
assertEqual
(
response
.
status_code
,
302
)
self
.
assertEqual
(
leases
,
Lease
.
objects
.
count
())
self
.
assertEqual
(
leases
,
Lease
.
objects
.
count
())
def
test_unpermitted_vm_disk_add
(
self
):
c
=
Client
()
self
.
login
(
c
,
"user2"
)
inst
=
Instance
.
objects
.
get
(
pk
=
1
)
inst
.
set_level
(
self
.
u1
,
'owner'
)
disks
=
inst
.
disks
.
count
()
response
=
c
.
post
(
"/dashboard/disk/add/"
,
{
'disk-name'
:
"a"
,
'disk-size'
:
1
,
'disk-is_template'
:
0
,
'disk-object_pk'
:
1
,
})
self
.
assertEqual
(
response
.
status_code
,
403
)
self
.
assertEqual
(
disks
,
inst
.
disks
.
count
())
@skip
(
"until fix merged"
)
def
test_permitted_vm_disk_add
(
self
):
c
=
Client
()
self
.
login
(
c
,
"user1"
)
inst
=
Instance
.
objects
.
get
(
pk
=
1
)
inst
.
set_level
(
self
.
u1
,
'owner'
)
# disks = inst.disks.count()
response
=
c
.
post
(
"/dashboard/disk/add/"
,
{
'disk-name'
:
"a"
,
'disk-size'
:
1
,
'disk-is_template'
:
0
,
'disk-object_pk'
:
1
,
})
self
.
assertEqual
(
response
.
status_code
,
302
)
# mancelery is needed TODO
# self.assertEqual(disks + 1, inst.disks.count())
def
test_notification_read
(
self
):
def
test_notification_read
(
self
):
c
=
Client
()
c
=
Client
()
self
.
login
(
c
,
"user1"
)
self
.
login
(
c
,
"user1"
)
...
...
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