Reduces the amount of mocked imports for Python 3

The evolution of the code as well as the Python 3 fixes has made some of
the module mocking unnecessary.

bp python3

Change-Id: I57e535012d89ee307acd43724dd678263704596f
This commit is contained in:
David Stanek 2014-07-22 17:01:37 +00:00
parent c770a3505f
commit 03d7e662af
1 changed files with 1 additions and 7 deletions

View File

@ -25,16 +25,10 @@ if six.PY3:
import sys
from unittest import mock # noqa: our import detection is naive?
# NOTE(dstanek): oslo.config is imported there so that later module
# that use it will still have access. If we don't import it now then
# it won't be available because of how I am patching oslo below.
import oslo.config # noqa: need this imported before the monkey patching
import oslo.db # noqa: need this imported before the monkey patching
sys.modules['eventlet'] = mock.Mock()
sys.modules['eventlet.green'] = mock.Mock()
sys.modules['eventlet.wsgi'] = mock.Mock()
sys.modules['oslo'] = mock.Mock()
sys.modules['oslo.messaging'] = mock.Mock()
sys.modules['oslo'].messaging = mock.Mock()
sys.modules['pycadf'] = mock.Mock()
sys.modules['paste'] = mock.Mock()