Move mock to slapmock to be explicit.

an absolute mock module is already used.
parent f6b08606
......@@ -58,13 +58,13 @@ class SlapMixin(unittest.TestCase):
def _patchHttplib(self):
"""Overrides httplib"""
import mock.httplib
import slapmock.httplib
self.saved_httplib = {}
for fake in vars(mock.httplib):
for fake in vars(slapmock.httplib):
self.saved_httplib[fake] = getattr(httplib, fake, None)
setattr(httplib, fake, getattr(mock.httplib, fake))
setattr(httplib, fake, getattr(slapmock.httplib, fake))
def _unpatchHttplib(self):
"""Restores httplib overriding"""
......
......@@ -236,13 +236,13 @@ class MasterMixin(BasicMixin):
def _patchHttplib(self):
"""Overrides httplib"""
import slapos.tests.mock.httplib
import slapos.tests.slapmock.httplib
self.saved_httplib = {}
for fake in vars(slapos.tests.mock.httplib):
for fake in vars(slapos.tests.slapmock.httplib):
self.saved_httplib[fake] = getattr(httplib, fake, None)
setattr(httplib, fake, getattr(slapos.tests.mock.httplib, fake))
setattr(httplib, fake, getattr(slapos.tests.slapmock.httplib, fake))
def _unpatchHttplib(self):
"""Restores httplib overriding"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment