Merge "Moving to use the mock module found in Python3"

This commit is contained in:
Jenkins 2014-07-11 19:39:42 +00:00 committed by Gerrit Code Review
commit 1fa6ddf6a2
8 changed files with 26 additions and 6 deletions

View File

@ -11,4 +11,7 @@
# under the License.
import six
six.add_move(six.MovedModule('mock', 'mock', 'unittest.mock'))
six.add_move(six.MovedModule('mox', 'mox', 'mox3.mox'))

View File

@ -20,7 +20,7 @@ import os
import tempfile
import fixtures
import mock
from six.moves import mock
import testtools
_TRUE_VALUES = ('True', 'true', '1', 'yes')

View File

@ -16,7 +16,7 @@
# under the License.
import fixtures
import mock
from six.moves import mock
class PatchObject(fixtures.Fixture):

View File

@ -4,5 +4,4 @@ python-subunit>=0.0.18
testscenarios>=0.4
testrepository>=0.0.18
testtools>=0.9.34
mock>=1.0
mox3>=0.7.0

View File

@ -0,0 +1,16 @@
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import six
six.add_move(six.MovedModule('mock', 'mock', 'unittest.mock'))

View File

@ -15,7 +15,7 @@
import logging
import unittest
import mock
from six.moves import mock
import testtools
from oslotest import base

View File

@ -13,7 +13,7 @@
# under the License.
import mock
from six.moves import mock
from oslotest import base
from oslotest import mockpatch

View File

@ -32,4 +32,6 @@ exclude = .tox,dist,doc,*.egg,build
builtins = _
[hacking]
import_exceptions = six.moves.mox
import_exceptions =
six.moves.mock
six.moves.mox