diff options
author | Daniel Watkins <oddbloke@ubuntu.com> | 2020-01-29 16:55:39 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-29 14:55:39 -0700 |
commit | 5f8f85bb38cc972d3d2c705a1ec73db3f690f323 (patch) | |
tree | 6f024357106ab9cd33334096dadd9978b3561849 /tests/unittests/test_datasource | |
parent | 8409dd7da21b064214091edd8f1469267be1e738 (diff) | |
download | vyos-cloud-init-5f8f85bb38cc972d3d2c705a1ec73db3f690f323.tar.gz vyos-cloud-init-5f8f85bb38cc972d3d2c705a1ec73db3f690f323.zip |
Replace mock library with unittest.mock (#186)
* cloudinit: replace "import mock" with "from unittest import mock"
* test-requirements.txt: drop mock
Co-authored-by: Chad Smith <chad.smith@canonical.com>
Diffstat (limited to 'tests/unittests/test_datasource')
-rw-r--r-- | tests/unittests/test_datasource/test_aliyun.py | 2 | ||||
-rw-r--r-- | tests/unittests/test_datasource/test_ec2.py | 2 | ||||
-rw-r--r-- | tests/unittests/test_datasource/test_gce.py | 2 | ||||
-rw-r--r-- | tests/unittests/test_datasource/test_maas.py | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/tests/unittests/test_datasource/test_aliyun.py b/tests/unittests/test_datasource/test_aliyun.py index e9213ca1..1e66fcdb 100644 --- a/tests/unittests/test_datasource/test_aliyun.py +++ b/tests/unittests/test_datasource/test_aliyun.py @@ -2,8 +2,8 @@ import functools import httpretty -import mock import os +from unittest import mock from cloudinit import helpers from cloudinit.sources import DataSourceAliYun as ay diff --git a/tests/unittests/test_datasource/test_ec2.py b/tests/unittests/test_datasource/test_ec2.py index 34a089f2..19e1af2b 100644 --- a/tests/unittests/test_datasource/test_ec2.py +++ b/tests/unittests/test_datasource/test_ec2.py @@ -3,7 +3,7 @@ import copy import httpretty import json -import mock +from unittest import mock from cloudinit import helpers from cloudinit.sources import DataSourceEc2 as ec2 diff --git a/tests/unittests/test_datasource/test_gce.py b/tests/unittests/test_datasource/test_gce.py index 67744d32..e9dd6e60 100644 --- a/tests/unittests/test_datasource/test_gce.py +++ b/tests/unittests/test_datasource/test_gce.py @@ -7,8 +7,8 @@ import datetime import httpretty import json -import mock import re +from unittest import mock from base64 import b64encode, b64decode from six.moves.urllib_parse import urlparse diff --git a/tests/unittests/test_datasource/test_maas.py b/tests/unittests/test_datasource/test_maas.py index c84d067e..2a81d3f5 100644 --- a/tests/unittests/test_datasource/test_maas.py +++ b/tests/unittests/test_datasource/test_maas.py @@ -1,11 +1,11 @@ # This file is part of cloud-init. See LICENSE file for license information. from copy import copy -import mock import os import shutil import tempfile import yaml +from unittest import mock from cloudinit.sources import DataSourceMAAS from cloudinit import url_helper |