Removes py3 test import hacks
Now that everything Keystone depends on can be installed on Python 3 there is no reason why we need to have these hacks anymore. Change-Id: I44d02fcac74eca5d282025b90693c2dae5a582b2
This commit is contained in:
parent
f15d9f493c
commit
141099ebca
|
@ -13,21 +13,6 @@
|
|||
# under the License.
|
||||
|
||||
import oslo_i18n
|
||||
import six
|
||||
|
||||
|
||||
if six.PY3:
|
||||
# NOTE(dstanek): This block will monkey patch libraries that are not
|
||||
# yet supported in Python3. We do this that that it is possible to
|
||||
# execute any tests at all. Without monkey patching modules the
|
||||
# tests will fail with import errors.
|
||||
|
||||
import sys
|
||||
from unittest import mock # noqa: our import detection is naive?
|
||||
|
||||
sys.modules['ldappool'] = mock.Mock()
|
||||
sys.modules['memcache'] = mock.Mock()
|
||||
sys.modules['oslo_messaging'] = mock.Mock()
|
||||
|
||||
# NOTE(dstanek): oslo_i18n.enable_lazy() must be called before
|
||||
# keystone.i18n._() is called to ensure it has the desired lazy lookup
|
||||
|
|
Loading…
Reference in New Issue