summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cloudinit/sources/tests/test_oracle.py2
-rw-r--r--tests/unittests/test_datasource/test_opennebula.py1
2 files changed, 3 insertions, 0 deletions
diff --git a/cloudinit/sources/tests/test_oracle.py b/cloudinit/sources/tests/test_oracle.py
index 4e135df9..2265327b 100644
--- a/cloudinit/sources/tests/test_oracle.py
+++ b/cloudinit/sources/tests/test_oracle.py
@@ -186,6 +186,7 @@ class TestDataSourceOracle(test_helpers.CiTestCase):
self.assertEqual(self.my_md['uuid'], ds.get_instance_id())
self.assertEqual(my_userdata, ds.userdata_raw)
+ @mock.patch(DS_PATH + ".get_interfaces_by_mac", mock.Mock(return_value={}))
@mock.patch(DS_PATH + "._add_network_config_from_opc_imds",
side_effect=lambda network_config: network_config)
@mock.patch(DS_PATH + ".cmdline.read_initramfs_config")
@@ -207,6 +208,7 @@ class TestDataSourceOracle(test_helpers.CiTestCase):
self.assertEqual([mock.call()], m_initramfs_config.call_args_list)
self.assertFalse(distro.generate_fallback_config.called)
+ @mock.patch(DS_PATH + ".get_interfaces_by_mac", mock.Mock(return_value={}))
@mock.patch(DS_PATH + "._add_network_config_from_opc_imds",
side_effect=lambda network_config: network_config)
@mock.patch(DS_PATH + ".cmdline.read_initramfs_config")
diff --git a/tests/unittests/test_datasource/test_opennebula.py b/tests/unittests/test_datasource/test_opennebula.py
index bb399f6d..de896a9e 100644
--- a/tests/unittests/test_datasource/test_opennebula.py
+++ b/tests/unittests/test_datasource/test_opennebula.py
@@ -355,6 +355,7 @@ class TestOpenNebulaDataSource(CiTestCase):
util.find_devs_with = orig_find_devs_with
+@mock.patch(DS_PATH + '.net.get_interfaces_by_mac', mock.Mock(return_value={}))
class TestOpenNebulaNetwork(unittest.TestCase):
system_nics = ('eth0', 'ens3')