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
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
f32bb524
authored
Jul 07, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: fix test_flush()
parent
fa3812a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
circle/vm/tests/test_models.py
+2
-0
No files found.
circle/vm/tests/test_models.py
View file @
f32bb524
...
@@ -375,6 +375,7 @@ class InstanceActivityTestCase(TestCase):
...
@@ -375,6 +375,7 @@ class InstanceActivityTestCase(TestCase):
node
=
MagicMock
(
spec
=
Node
,
enabled
=
True
)
node
=
MagicMock
(
spec
=
Node
,
enabled
=
True
)
node
.
instance_set
.
all
.
return_value
=
insts
node
.
instance_set
.
all
.
return_value
=
insts
user
=
MagicMock
(
spec
=
User
)
user
=
MagicMock
(
spec
=
User
)
user
.
is_superuser
=
MagicMock
(
return_value
=
True
)
flush_op
=
FlushOperation
(
node
)
flush_op
=
FlushOperation
(
node
)
with
patch
.
object
(
FlushOperation
,
'create_activity'
)
as
create_act
:
with
patch
.
object
(
FlushOperation
,
'create_activity'
)
as
create_act
:
...
@@ -386,6 +387,7 @@ class InstanceActivityTestCase(TestCase):
...
@@ -386,6 +387,7 @@ class InstanceActivityTestCase(TestCase):
node
.
disable
.
assert_called_with
(
user
,
act
)
node
.
disable
.
assert_called_with
(
user
,
act
)
for
i
in
insts
:
for
i
in
insts
:
i
.
migrate
.
assert_called
()
i
.
migrate
.
assert_called
()
user
.
is_superuser
.
assert_called
()
def
test_flush_disabled_wo_user
(
self
):
def
test_flush_disabled_wo_user
(
self
):
insts
=
[
MagicMock
(
spec
=
Instance
,
migrate
=
MagicMock
()),
insts
=
[
MagicMock
(
spec
=
Instance
,
migrate
=
MagicMock
()),
...
...
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