Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
kedifa
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
kedifa
Commits
1db0fdcf
Commit
1db0fdcf
authored
May 14, 2019
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! updater: Implement prepare system
parent
86b0021f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
kedifa/test.py
kedifa/test.py
+8
-6
No files found.
kedifa/test.py
View file @
1db0fdcf
...
...
@@ -1428,11 +1428,12 @@ class KedifaUpdaterLoopTest(
self
.
assertFalse
(
os
.
path
.
exists
(
lock_file
))
self
.
assertFalse
(
os
.
path
.
exists
(
self
.
state
))
with
mock
.
patch
.
object
(
updater
.
Updater
,
'prepare'
)
as
mock_
object
:
updater
.
Updater
,
'prepare'
)
as
mock_
prepare
:
with
mock
.
patch
.
object
(
updater
.
Updater
,
'action'
,
return_value
=
None
)
as
mock_
object
:
updater
.
Updater
,
'action'
,
return_value
=
None
)
as
mock_
action
:
u
.
loop
()
mock_object
.
assert_called
()
mock_prepare
.
assert_called
()
mock_action
.
assert_called
()
self
.
assertFalse
(
os
.
path
.
exists
(
lock_file
))
self
.
assertFalse
(
os
.
path
.
exists
(
self
.
state
))
...
...
@@ -1472,13 +1473,14 @@ class KedifaUpdaterLoopTest(
self
.
assertFalse
(
os
.
path
.
exists
(
lock_file
))
self
.
assertFalse
(
os
.
path
.
exists
(
self
.
state
))
with
mock
.
patch
.
object
(
updater
.
Updater
,
'prepare'
,
return_value
=
None
)
as
mock_
object
:
updater
.
Updater
,
'prepare'
,
return_value
=
None
)
as
mock_
prepare
:
with
mock
.
patch
.
object
(
updater
.
Updater
,
'action'
,
return_value
=
None
)
as
mock_
object
:
updater
.
Updater
,
'action'
,
return_value
=
None
)
as
mock_
action
:
with
mock
.
patch
.
object
(
updater
.
time
,
'sleep'
,
side_effect
=
ValueError
(
'timer'
))
as
timer
:
self
.
assertRaises
(
ValueError
,
u
.
loop
)
timer
.
assert_called_with
(
1
)
mock_object
.
assert_called
()
mock_prepare
.
assert_called
()
mock_action
.
assert_called
()
self
.
assertFalse
(
os
.
path
.
exists
(
lock_file
))
self
.
assertFalse
(
os
.
path
.
exists
(
self
.
state
))
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