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
Léo-Paul Géneau
slapos.core
Commits
e7227474
Commit
e7227474
authored
Oct 02, 2013
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move mock to slapmock to be explicit.
an absolute mock module is already used.
parent
f6b08606
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
slapos/tests/slap.py
slapos/tests/slap.py
+3
-3
slapos/tests/slapgrid.py
slapos/tests/slapgrid.py
+3
-3
slapos/tests/slapmock/__init__.py
slapos/tests/slapmock/__init__.py
+0
-0
slapos/tests/slapmock/httplib.py
slapos/tests/slapmock/httplib.py
+0
-0
No files found.
slapos/tests/slap.py
View file @
e7227474
...
...
@@ -58,13 +58,13 @@ class SlapMixin(unittest.TestCase):
def
_patchHttplib
(
self
):
"""Overrides httplib"""
import
mock.httplib
import
slap
mock.httplib
self
.
saved_httplib
=
{}
for
fake
in
vars
(
mock
.
httplib
):
for
fake
in
vars
(
slap
mock
.
httplib
):
self
.
saved_httplib
[
fake
]
=
getattr
(
httplib
,
fake
,
None
)
setattr
(
httplib
,
fake
,
getattr
(
mock
.
httplib
,
fake
))
setattr
(
httplib
,
fake
,
getattr
(
slap
mock
.
httplib
,
fake
))
def
_unpatchHttplib
(
self
):
"""Restores httplib overriding"""
...
...
slapos/tests/slapgrid.py
View file @
e7227474
...
...
@@ -236,13 +236,13 @@ class MasterMixin(BasicMixin):
def
_patchHttplib
(
self
):
"""Overrides httplib"""
import
slapos.tests.mock.httplib
import
slapos.tests.
slap
mock.httplib
self
.
saved_httplib
=
{}
for
fake
in
vars
(
slapos
.
tests
.
mock
.
httplib
):
for
fake
in
vars
(
slapos
.
tests
.
slap
mock
.
httplib
):
self
.
saved_httplib
[
fake
]
=
getattr
(
httplib
,
fake
,
None
)
setattr
(
httplib
,
fake
,
getattr
(
slapos
.
tests
.
mock
.
httplib
,
fake
))
setattr
(
httplib
,
fake
,
getattr
(
slapos
.
tests
.
slap
mock
.
httplib
,
fake
))
def
_unpatchHttplib
(
self
):
"""Restores httplib overriding"""
...
...
slapos/tests/mock/__init__.py
→
slapos/tests/
slap
mock/__init__.py
View file @
e7227474
File moved
slapos/tests/mock/httplib.py
→
slapos/tests/
slap
mock/httplib.py
View file @
e7227474
File moved
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