summaryrefslogtreecommitdiff
path: root/cloudinit/net/tests
diff options
context:
space:
mode:
authorDaniel Watkins <oddbloke@ubuntu.com>2020-01-29 16:55:39 -0500
committerGitHub <noreply@github.com>2020-01-29 14:55:39 -0700
commit5f8f85bb38cc972d3d2c705a1ec73db3f690f323 (patch)
tree6f024357106ab9cd33334096dadd9978b3561849 /cloudinit/net/tests
parent8409dd7da21b064214091edd8f1469267be1e738 (diff)
downloadvyos-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 'cloudinit/net/tests')
-rw-r--r--cloudinit/net/tests/test_init.py2
-rw-r--r--cloudinit/net/tests/test_network_state.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/cloudinit/net/tests/test_init.py b/cloudinit/net/tests/test_init.py
index 6db93e26..5081a337 100644
--- a/cloudinit/net/tests/test_init.py
+++ b/cloudinit/net/tests/test_init.py
@@ -3,10 +3,10 @@
import copy
import errno
import httpretty
-import mock
import os
import requests
import textwrap
+from unittest import mock
import cloudinit.net as net
from cloudinit.util import ensure_file, write_file, ProcessExecutionError
diff --git a/cloudinit/net/tests/test_network_state.py b/cloudinit/net/tests/test_network_state.py
index fcb4a995..55880852 100644
--- a/cloudinit/net/tests/test_network_state.py
+++ b/cloudinit/net/tests/test_network_state.py
@@ -1,6 +1,7 @@
# This file is part of cloud-init. See LICENSE file for license information.
-import mock
+from unittest import mock
+
from cloudinit.net import network_state
from cloudinit.tests.helpers import CiTestCase