Browse Source

Use unittest.mock instead of mock

The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.

Change-Id: Iccf78a04a66dcef383d9e38ac3990f3c838bdf84
changes/51/734351/2
Hervé Beraud 2 years ago
parent
commit
80167d4908
  1. 3
      ironic_inspector/test/unit/test_plugins_base_physnet.py
  2. 3
      ironic_inspector/test/unit/test_plugins_physnet_cidr_map.py
  3. 1
      lower-constraints.txt

3
ironic_inspector/test/unit/test_plugins_base_physnet.py

@ -13,7 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
from unittest import mock
from oslo_config import cfg
from ironic_inspector import node_cache

3
ironic_inspector/test/unit/test_plugins_physnet_cidr_map.py

@ -11,7 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
from unittest import mock
from openstack import exceptions
from oslo_config import cfg

1
lower-constraints.txt

@ -49,7 +49,6 @@ kombu==4.6.8
linecache2==1.0.0
Mako==1.1.2
MarkupSafe==1.1.1
mock==3.0.0
monotonic==1.5
mox3==1.0.0
msgpack==1.0.0

Loading…
Cancel
Save