diff options
author | Christian Ehrhardt <christian.ehrhardt@canonical.com> | 2016-06-09 09:18:35 +0200 |
---|---|---|
committer | Christian Ehrhardt <christian.ehrhardt@canonical.com> | 2016-06-09 09:18:35 +0200 |
commit | b89ac6b7caeeade5ad21137773ac4496cdaea2c5 (patch) | |
tree | 8cc479ca22be1ae12d99e3c18376c1d51414010f /tests/unittests/test_handler | |
parent | 3a51f0df3270a70a130b0dea7d3410b4742dcb2a (diff) | |
download | vyos-cloud-init-b89ac6b7caeeade5ad21137773ac4496cdaea2c5.tar.gz vyos-cloud-init-b89ac6b7caeeade5ad21137773ac4496cdaea2c5.zip |
move gpg functions into gpg.py
This helps for cleaner code structuring.
ALong that makeing sure all these functions have a gpg_prefix.
Diffstat (limited to 'tests/unittests/test_handler')
-rw-r--r-- | tests/unittests/test_handler/test_handler_apt_source.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/unittests/test_handler/test_handler_apt_source.py b/tests/unittests/test_handler/test_handler_apt_source.py index 3f87fad3..b09dd8ab 100644 --- a/tests/unittests/test_handler/test_handler_apt_source.py +++ b/tests/unittests/test_handler/test_handler_apt_source.py @@ -14,6 +14,7 @@ from mock import call from cloudinit.config import cc_apt_configure from cloudinit import util +from cloudinit import gpg from ..helpers import TestCase @@ -58,7 +59,6 @@ class TestAptSourceConfig(TestCase): # mock fallback filename into writable tmp dir self.fallbackfn = os.path.join(self.tmp, "etc/apt/sources.list.d/", "cloud_config_sources.list") - self.orig_gpg_recv_key = util.gpg_recv_key patcher = mock.patch("cloudinit.config.cc_apt_configure.get_release") get_rel = patcher.start() @@ -407,7 +407,7 @@ class TestAptSourceConfig(TestCase): params = self._get_default_params() with mock.patch.object(cc_apt_configure, 'add_apt_key_raw') as mockkey: - with mock.patch.object(util, 'getkeybyid', + with mock.patch.object(gpg, 'gpg_getkeybyid', return_value=expectedkey) as mockgetkey: cc_apt_configure.add_apt_sources([cfg], params) |