Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
109
Merge Requests
109
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
083c3a00
Commit
083c3a00
authored
Sep 12, 2012
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Un-monkeypatch utils module after test, otherwise it will spread over tests.
parent
332de509
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
slapos/tests/slapobject.py
slapos/tests/slapobject.py
+12
-2
No files found.
slapos/tests/slapobject.py
View file @
083c3a00
...
...
@@ -15,8 +15,8 @@ class FakeCallAndRead:
self
.
external_command_list
.
extend
(
additional_buildout_parametr_list
)
FakeCallAndRead
=
FakeCallAndRead
()
#utils.bootstrapBuildout = FakeCallAndRead
#utils.launchBuildout = FakeCallAndRead
originalBootstrapBuildout
=
utils
.
bootstrapBuildout
originalLaunchBuildout
=
utils
.
launchBuildout
class
TestSoftwareSlapObject
(
BasicMixin
,
unittest
.
TestCase
):
"""
...
...
@@ -34,10 +34,20 @@ class TestSoftwareSlapObject(BasicMixin, unittest.TestCase):
self
.
shadir_cert_file
=
'/path/to/shadir/cert/file'
self
.
shadir_key_file
=
'/path/to/shadir/key/file'
# Monkey patch utils module
utils
.
bootstrapBuildout
=
FakeCallAndRead
utils
.
launchBuildout
=
FakeCallAndRead
def
tearDown
(
self
):
global
originalBootstrapBuildout
global
originalLaunchBuildout
BasicMixin
.
tearDown
(
self
)
FakeCallAndRead
.
external_command_list
=
[]
# Un-monkey patch utils module
utils
.
bootstrapBuildout
=
originalBootstrapBuildout
utils
.
launchBuildout
=
originalLaunchBuildout
# Test methods
def
test_software_install_with_networkcache
(
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