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
50a6f530
authored
Mar 15, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: fix tests
they didn't even run
parent
69057f65
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
circle/vm/tests/test_models.py
+6
-5
No files found.
circle/vm/tests/test_models.py
View file @
50a6f530
...
...
@@ -36,17 +36,18 @@ class InstanceTestCase(TestCase):
inst
=
Mock
(
state
=
'RUNNING'
)
assert
Instance
.
is_running
.
getter
(
inst
)
def
deploy_destroyed
(
self
):
inst
=
Mock
(
destroyed_at
=
datetime
.
now
())
def
test_deploy_destroyed
(
self
):
inst
=
Mock
(
destroyed_at
=
datetime
.
now
(),
spec
=
Instance
,
InstanceDestroyedError
=
Instance
.
InstanceDestroyedError
)
with
self
.
assertRaises
(
Instance
.
InstanceDestroyedError
):
Instance
.
deploy
(
inst
)
def
destroy_destroyed
(
self
):
inst
=
Mock
(
destroyed_at
=
datetime
.
now
())
def
test_
destroy_destroyed
(
self
):
inst
=
Mock
(
destroyed_at
=
datetime
.
now
()
,
spec
=
Instance
)
Instance
.
destroy
(
inst
)
self
.
assertFalse
(
inst
.
save
.
called
)
def
destroy_sets_destroyed
(
self
):
def
test_
destroy_sets_destroyed
(
self
):
inst
=
MagicMock
(
destroyed_at
=
None
,
spec
=
Instance
)
inst
.
node
=
MagicMock
(
spec
=
Node
)
inst
.
disks
.
all
.
return_value
=
[]
...
...
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