Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library unittest.mock module instead of the third party mock lib. Change-Id: I97af946c244559513689c1ea9ac2d736d55dbe0f Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
parent
0236797717
commit
f6fb359cf5
@ -16,9 +16,9 @@
|
|||||||
import io
|
import io
|
||||||
import json
|
import json
|
||||||
import tempfile
|
import tempfile
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
import fixtures
|
import fixtures
|
||||||
import mock
|
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
from metalsmith import _cmd
|
from metalsmith import _cmd
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from metalsmith import _instance
|
from metalsmith import _instance
|
||||||
from metalsmith.test import test_provisioner
|
from metalsmith.test import test_provisioner
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
import mock
|
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
from metalsmith import instance_config
|
from metalsmith import instance_config
|
||||||
|
@ -13,8 +13,9 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
import fixtures
|
import fixtures
|
||||||
import mock
|
|
||||||
from openstack import exceptions as os_exc
|
from openstack import exceptions as os_exc
|
||||||
import requests
|
import requests
|
||||||
import testtools
|
import testtools
|
||||||
|
@ -13,7 +13,8 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
from metalsmith import _scheduler
|
from metalsmith import _scheduler
|
||||||
|
@ -13,7 +13,8 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
from metalsmith import exceptions
|
from metalsmith import exceptions
|
||||||
|
@ -6,7 +6,6 @@ doc8>=0.6.0 # Apache-2.0
|
|||||||
flake8-import-order>=0.13 # LGPLv3
|
flake8-import-order>=0.13 # LGPLv3
|
||||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||||
hacking>=3.0.0,<3.1.0 # Apache-2.0
|
hacking>=3.0.0,<3.1.0 # Apache-2.0
|
||||||
mock>=2.0 # BSD
|
|
||||||
stestr>=1.0.0 # Apache-2.0
|
stestr>=1.0.0 # Apache-2.0
|
||||||
testtools>=2.2.0 # MIT
|
testtools>=2.2.0 # MIT
|
||||||
Pygments>=2.2.0 # BSD
|
Pygments>=2.2.0 # BSD
|
||||||
|
Loading…
Reference in New Issue
Block a user