summaryrefslogtreecommitdiff
path: root/tests/unittests/test_handler/test_handler_apt_source_v3.py
diff options
context:
space:
mode:
authorDaniel Watkins <oddbloke@ubuntu.com>2020-01-23 16:32:01 -0500
committerChad Smith <chad.smith@canonical.com>2020-01-23 14:32:01 -0700
commit6b157aa60a10fa74374287f0ec0313255e0462b4 (patch)
tree8d2e89cdde2cf3ca1450f7fd14f386639f838dc2 /tests/unittests/test_handler/test_handler_apt_source_v3.py
parent6603706eec1c39d9d591c8ffa0ef7171b74d84d6 (diff)
downloadvyos-cloud-init-6b157aa60a10fa74374287f0ec0313255e0462b4.tar.gz
vyos-cloud-init-6b157aa60a10fa74374287f0ec0313255e0462b4.zip
cloudinit: remove ImportError handling for mock imports (#182)
We only run on Python 3 now, so we can unambiguously expect unittest.mock to exist.
Diffstat (limited to 'tests/unittests/test_handler/test_handler_apt_source_v3.py')
-rw-r--r--tests/unittests/test_handler/test_handler_apt_source_v3.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/tests/unittests/test_handler/test_handler_apt_source_v3.py b/tests/unittests/test_handler/test_handler_apt_source_v3.py
index c5cf6785..90949b6d 100644
--- a/tests/unittests/test_handler/test_handler_apt_source_v3.py
+++ b/tests/unittests/test_handler/test_handler_apt_source_v3.py
@@ -11,13 +11,8 @@ import shutil
import socket
import tempfile
-from unittest import TestCase
-
-try:
- from unittest import mock
-except ImportError:
- import mock
-from mock import call
+from unittest import TestCase, mock
+from unittest.mock import call
from cloudinit import cloud
from cloudinit import distros