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
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
e185ea3e
authored
Mar 12, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: test GETs with invalid/expired tokens
parent
6dfa952b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletions
+5
-1
circle/dashboard/tests/test_views.py
+4
-0
circle/dashboard/views.py
+1
-1
No files found.
circle/dashboard/tests/test_views.py
View file @
e185ea3e
...
...
@@ -408,6 +408,8 @@ class RenewViewTest(LoginMixin, TestCase):
filter
(
activity_code__endswith
=
'renew'
)
.
count
()
c
=
Client
()
self
.
login
(
c
,
'user2'
)
response
=
c
.
get
(
key
)
self
.
assertEquals
(
response
.
status_code
,
404
)
response
=
c
.
post
(
key
)
self
.
assertEquals
(
response
.
status_code
,
404
)
ct2
=
Instance
.
objects
.
get
(
pk
=
1
)
.
activity_log
.
\
...
...
@@ -421,6 +423,8 @@ class RenewViewTest(LoginMixin, TestCase):
filter
(
activity_code__endswith
=
'renew'
)
.
count
()
c
=
Client
()
self
.
login
(
c
,
'user2'
)
response
=
c
.
get
(
key
)
self
.
assertEquals
(
response
.
status_code
,
302
)
response
=
c
.
post
(
key
)
self
.
assertEquals
(
response
.
status_code
,
403
)
ct2
=
Instance
.
objects
.
get
(
pk
=
12
)
.
activity_log
.
\
...
...
circle/dashboard/views.py
View file @
e185ea3e
...
...
@@ -1662,7 +1662,7 @@ class AbstractVmFunctionView(AccessMixin, View):
user
=
User
.
objects
.
get
(
pk
=
user
)
return
user
def
do_action
(
self
,
instance
,
user
):
def
do_action
(
self
,
instance
,
user
):
# noqa
raise
NotImplementedError
(
'Please override do_action(instance, user)'
)
def
get_context
(
self
,
instance
):
...
...
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