diff options
author | Daniel Watkins <oddbloke@ubuntu.com> | 2020-04-20 14:50:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-20 14:50:37 -0400 |
commit | d7cad8b61a3b5929a65202e0964aa9b4624e06c4 (patch) | |
tree | 58618b95d177be1ac828c0931813ba61f75c0d63 /tests/unittests/test_datasource | |
parent | 0c5c736727d0f8e363678fe970d70bb889e3893c (diff) | |
download | vyos-cloud-init-d7cad8b61a3b5929a65202e0964aa9b4624e06c4.tar.gz vyos-cloud-init-d7cad8b61a3b5929a65202e0964aa9b4624e06c4.zip |
tests: add missing mocks for get_interfaces_by_mac (#326)
We currently have a test system where get_interfaces_by_mac raises an
exception, which is causing these tests to fail as they aren't mocking
get_interfaces_by_mac out.
LP: #1873910
Diffstat (limited to 'tests/unittests/test_datasource')
-rw-r--r-- | tests/unittests/test_datasource/test_opennebula.py | 1 |
1 files changed, 1 insertions, 0 deletions
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') |