Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
12
Merge Requests
12
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
slapos.package
Commits
285e04f4
Commit
285e04f4
authored
Jul 15, 2014
by
Rafael Monnerat
👻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos.package.test: Restore original method after the test
parent
67b7dff5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
slapos/package/test/test_base_promise.py
slapos/package/test/test_base_promise.py
+6
-0
No files found.
slapos/package/test/test_base_promise.py
View file @
285e04f4
...
@@ -48,7 +48,9 @@ def _fake_signature_download(self, path, *args, **kwargs):
...
@@ -48,7 +48,9 @@ def _fake_signature_download(self, path, *args, **kwargs):
class
testBasePromiseCase
(
unittest
.
TestCase
):
class
testBasePromiseCase
(
unittest
.
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
self
.
original_basepromise_call
=
BasePromise
.
_call
BasePromise
.
_call
=
_fake_call
BasePromise
.
_call
=
_fake_call
self
.
original_network_cache_download
=
NetworkCache
.
download
NetworkCache
.
download
=
_fake_signature_download
NetworkCache
.
download
=
_fake_signature_download
global
FAKE_CALL_COUNTER
global
FAKE_CALL_COUNTER
FAKE_CALL_COUNTER
=
0
FAKE_CALL_COUNTER
=
0
...
@@ -60,6 +62,10 @@ class testBasePromiseCase(unittest.TestCase):
...
@@ -60,6 +62,10 @@ class testBasePromiseCase(unittest.TestCase):
"verbose"
:
False
"verbose"
:
False
}
}
def
tearDown
(
self
):
BasePromise
.
_call
=
self
.
original_basepromise_call
NetworkCache
.
download
=
self
.
original_network_cache_download
def
_createConfigurationFile
(
self
):
def
_createConfigurationFile
(
self
):
with
open
(
"/tmp/test_base_promise_configuration.cfg"
,
"w"
)
as
configuration_file
:
with
open
(
"/tmp/test_base_promise_configuration.cfg"
,
"w"
)
as
configuration_file
:
...
...
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