diff options
author | James Falcon <james.falcon@canonical.com> | 2021-10-29 14:54:33 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-29 14:54:33 -0500 |
commit | 0f8428f6227106c28615384d49a3e55e5c14dc17 (patch) | |
tree | 3779ba3e85a5bfe265b73d14619bfb36f5f643e4 /tests/unittests | |
parent | 28581988da4b37e3d2423075c64dc1f3bc5da5cc (diff) | |
download | vyos-cloud-init-0f8428f6227106c28615384d49a3e55e5c14dc17.tar.gz vyos-cloud-init-0f8428f6227106c28615384d49a3e55e5c14dc17.zip |
Add necessary mocks to test_ovf unit tests (#1087)
Diffstat (limited to 'tests/unittests')
-rw-r--r-- | tests/unittests/test_datasource/test_ovf.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/unittests/test_datasource/test_ovf.py b/tests/unittests/test_datasource/test_ovf.py index f5818a3a..ad7446f8 100644 --- a/tests/unittests/test_datasource/test_ovf.py +++ b/tests/unittests/test_datasource/test_ovf.py @@ -518,10 +518,16 @@ class TestDatasourceOVF(CiTestCase): 'vmware (%s/seed/ovf-env.xml)' % self.tdir, ds.subplatform) - def test_get_data_vmware_guestinfo_with_network_config(self): + @mock.patch('cloudinit.subp.subp') + @mock.patch('cloudinit.sources.DataSource.persist_instance_data') + def test_get_data_vmware_guestinfo_with_network_config( + self, m_persist, m_subp + ): self._test_get_data_with_network_config(guestinfo=False, iso=True) - def test_get_data_iso9660_with_network_config(self): + @mock.patch('cloudinit.subp.subp') + @mock.patch('cloudinit.sources.DataSource.persist_instance_data') + def test_get_data_iso9660_with_network_config(self, m_persist, m_subp): self._test_get_data_with_network_config(guestinfo=True, iso=False) def _test_get_data_with_network_config(self, guestinfo, iso): |