Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6fe20d19
authored
Apr 24, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: small changes to match django1.6
parent
9741b9ed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
circle/dashboard/tests/test_views.py
+2
-3
circle/dashboard/views.py
+4
-3
No files found.
circle/dashboard/tests/test_views.py
View file @
6fe20d19
...
...
@@ -4,7 +4,6 @@ from unittest import skip
from
django.test
import
TestCase
from
django.test.client
import
Client
from
django.contrib.auth.models
import
User
,
Group
from
django.core.exceptions
import
SuspiciousOperation
from
django.core.urlresolvers
import
reverse
from
django.contrib.auth.models
import
Permission
from
django.contrib.auth
import
authenticate
...
...
@@ -897,8 +896,8 @@ class TransferOwnershipViewTest(LoginMixin, TestCase):
c2
=
self
.
u2
.
notification_set
.
count
()
c
=
Client
()
self
.
login
(
c
,
'user2'
)
with
self
.
assertRaises
(
SuspiciousOperation
):
c
.
post
(
'/dashboard/vm/1/tx/'
)
response
=
c
.
post
(
'/dashboard/vm/1/tx/'
)
assert
response
.
status_code
==
400
self
.
assertEqual
(
self
.
u2
.
notification_set
.
count
(),
c2
)
def
test_owned_offer
(
self
):
...
...
circle/dashboard/views.py
View file @
6fe20d19
...
...
@@ -30,9 +30,8 @@ from django.template import RequestContext
from
django.forms.models
import
inlineformset_factory
from
django_tables2
import
SingleTableView
from
braces.views
import
(
LoginRequiredMixin
,
SuperuserRequiredMixin
,
AccessMixin
)
from
braces.views
import
LoginRequiredMixin
,
SuperuserRequiredMixin
from
braces.views._access
import
AccessMixin
from
.forms
import
(
CircleAuthenticationForm
,
DiskAddForm
,
HostForm
,
LeaseForm
,
MyProfileForm
,
...
...
@@ -504,6 +503,7 @@ class OperationView(DetailView):
class
VmOperationView
(
OperationView
):
model
=
Instance
context_object_name
=
'instance'
# much simpler to mock object
class
VmMigrateView
(
VmOperationView
):
...
...
@@ -2274,6 +2274,7 @@ def get_disk_download_status(request, pk):
class
InstanceActivityDetail
(
SuperuserRequiredMixin
,
DetailView
):
model
=
InstanceActivity
context_object_name
=
'instanceactivity'
# much simpler to mock object
template_name
=
'dashboard/instanceactivity_detail.html'
def
get_context_data
(
self
,
**
kwargs
):
...
...
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