Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
slapos.core
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
Hide 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:
...
@@ -15,8 +15,8 @@ class FakeCallAndRead:
self
.
external_command_list
.
extend
(
additional_buildout_parametr_list
)
self
.
external_command_list
.
extend
(
additional_buildout_parametr_list
)
FakeCallAndRead
=
FakeCallAndRead
()
FakeCallAndRead
=
FakeCallAndRead
()
#utils.bootstrapBuildout = FakeCallAndRead
originalBootstrapBuildout
=
utils
.
bootstrapBuildout
#utils.launchBuildout = FakeCallAndRead
originalLaunchBuildout
=
utils
.
launchBuildout
class
TestSoftwareSlapObject
(
BasicMixin
,
unittest
.
TestCase
):
class
TestSoftwareSlapObject
(
BasicMixin
,
unittest
.
TestCase
):
"""
"""
...
@@ -34,10 +34,20 @@ 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_cert_file
=
'/path/to/shadir/cert/file'
self
.
shadir_key_file
=
'/path/to/shadir/key/file'
self
.
shadir_key_file
=
'/path/to/shadir/key/file'
# Monkey patch utils module
utils
.
bootstrapBuildout
=
FakeCallAndRead
utils
.
launchBuildout
=
FakeCallAndRead
def
tearDown
(
self
):
def
tearDown
(
self
):
global
originalBootstrapBuildout
global
originalLaunchBuildout
BasicMixin
.
tearDown
(
self
)
BasicMixin
.
tearDown
(
self
)
FakeCallAndRead
.
external_command_list
=
[]
FakeCallAndRead
.
external_command_list
=
[]
# Un-monkey patch utils module
utils
.
bootstrapBuildout
=
originalBootstrapBuildout
utils
.
launchBuildout
=
originalLaunchBuildout
# Test methods
# Test methods
def
test_software_install_with_networkcache
(
self
):
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