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
Arnaud Véron
slapos.core
Commits
3ce2f2ad
Commit
3ce2f2ad
authored
Aug 08, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert comments to docstrings.
parent
0aa309dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
slapos/tests/slapgrid.py
slapos/tests/slapgrid.py
+2
-2
No files found.
slapos/tests/slapgrid.py
View file @
3ce2f2ad
...
@@ -51,7 +51,7 @@ class TestBasicSlapgridCP(BasicMixin, unittest.TestCase):
...
@@ -51,7 +51,7 @@ class TestBasicSlapgridCP(BasicMixin, unittest.TestCase):
class
MasterMixin
(
BasicMixin
):
class
MasterMixin
(
BasicMixin
):
def
_patchHttplib
(
self
):
def
_patchHttplib
(
self
):
# XXX-Antoine: save and override the httplib
"""Overrides httplib"""
import
mock.httplib
import
mock.httplib
self
.
saved_httplib
=
dict
()
self
.
saved_httplib
=
dict
()
...
@@ -61,7 +61,7 @@ class MasterMixin(BasicMixin):
...
@@ -61,7 +61,7 @@ class MasterMixin(BasicMixin):
setattr
(
httplib
,
fake
,
getattr
(
mock
.
httplib
,
fake
))
setattr
(
httplib
,
fake
,
getattr
(
mock
.
httplib
,
fake
))
def
_unpatchHttplib
(
self
):
def
_unpatchHttplib
(
self
):
# XXX-Antoine: restore the httplib like it was
"""Restores httplib overriding"""
import
httplib
import
httplib
for
name
,
original_value
in
self
.
saved_httplib
.
items
():
for
name
,
original_value
in
self
.
saved_httplib
.
items
():
setattr
(
httplib
,
name
,
original_value
)
setattr
(
httplib
,
name
,
original_value
)
...
...
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