Remove the dependency on the "mock" package

Now that we are python3 only, we should move to using the built
in version of mock that supports all of our testing needs and
remove the dependency on the "mock" package.

This patch moves all references to "import mock" to
"from unittest import mock". It also cleans up some new line
inconsistency.

Change-Id: Id881071803e580c10ca3ff33689d01b8b305b3e8
This commit is contained in:
Michael Johnson 2020-03-13 09:28:06 -07:00
parent 74ebe6071d
commit 943e0d4aa6
18 changed files with 16 additions and 36 deletions

View File

@ -19,8 +19,6 @@ jsonschema==2.6.0
keystoneauth1==3.4.0
linecache2==1.0.0
mccabe==0.2.1
mock==2.0.0
mox3==0.20.0
msgpack-python==0.4.0
munch==2.1.0
netifaces==0.10.4

View File

@ -12,10 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.
#
import copy
import mock
import sys
from unittest import mock
from oslo_serialization import jsonutils

View File

@ -10,9 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
#
import copy
import mock
from unittest import mock
from osc_lib.tests import utils

View File

@ -10,9 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
#
import copy
import mock
from unittest import mock
import osc_lib.tests.utils as osc_test_utils

View File

@ -12,9 +12,8 @@
# 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 copy
import mock
from unittest import mock
from osc_lib import exceptions

View File

@ -12,9 +12,8 @@
# 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 copy
import mock
from unittest import mock
from osc_lib import exceptions

View File

@ -12,9 +12,8 @@
# 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 copy
import mock
from unittest import mock
from osc_lib import exceptions

View File

@ -12,9 +12,8 @@
# 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 copy
import mock
from unittest import mock
from osc_lib import exceptions

View File

@ -12,9 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
#
import copy
import mock
from unittest import mock
from osc_lib import exceptions

View File

@ -12,9 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
#
import copy
import mock
from unittest import mock
from osc_lib import exceptions

View File

@ -12,9 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
#
import copy
import mock
from unittest import mock
from octaviaclient.osc.v2 import constants
from octaviaclient.osc.v2 import l7rule

View File

@ -10,9 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
#
import copy
import mock
from unittest import mock
from osc_lib import exceptions

View File

@ -10,10 +10,9 @@
# License for the specific language governing permissions and limitations
# under the License.
#
import copy
import itertools
import mock
from unittest import mock
import munch
from osc_lib import exceptions

View File

@ -10,10 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
#
import copy
import mock
from unittest import mock
import osc_lib.tests.utils as osc_test_utils

View File

@ -11,9 +11,8 @@
# License for the specific language governing permissions and limitations
# under the License.
#
import copy
import mock
from unittest import mock
from osc_lib import exceptions

View File

@ -12,9 +12,8 @@
# 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 copy
import mock
from unittest import mock
from octaviaclient.osc.v2 import constants
from octaviaclient.osc.v2 import provider

View File

@ -10,9 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
#
import copy
import mock
from unittest import mock
from osc_lib import exceptions

View File

@ -5,7 +5,6 @@
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
requests-mock>=1.1.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
mock>=2.0.0 # BSD
python-subunit>=1.0.0 # Apache-2.0/BSD
oslotest>=3.2.0 # Apache-2.0
stestr>=2.0.0 # Apache-2.0