Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
circlestack
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
735f6921
authored
Jul 27, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix renew tests to match non-required lease
parent
cb715174
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
circle/dashboard/tests/test_mockedviews.py
+5
-1
No files found.
circle/dashboard/tests/test_mockedviews.py
View file @
735f6921
...
...
@@ -280,6 +280,7 @@ class RenewViewTest(unittest.TestCase):
view
=
vm_ops
[
'renew'
]
with
patch
.
object
(
view
,
'get_object'
)
as
go
,
\
patch
(
'dashboard.views.messages'
)
as
msg
,
\
patch
(
'dashboard.views.get_object_or_404'
)
as
go4
:
inst
=
MagicMock
(
spec
=
Instance
)
inst
.
_meta
.
object_name
=
"Instance"
...
...
@@ -288,7 +289,10 @@ class RenewViewTest(unittest.TestCase):
inst
.
has_level
.
return_value
=
True
go
.
return_value
=
inst
go4
.
return_value
=
MagicMock
()
assert
view
.
as_view
()(
request
,
pk
=
1234
)
.
render
()
.
status_code
==
200
assert
view
.
as_view
()(
request
,
pk
=
1234
)
assert
not
msg
.
error
.
called
assert
inst
.
renew
.
async
.
called_with
(
user
=
request
.
user
,
lease
=
None
)
assert
inst
.
renew
.
async
.
return_value
.
get
.
called
# success would redirect
def
test_renew_by_owner_w_param
(
self
):
...
...
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