summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrett Holman <bholman.devel@gmail.com>2021-12-07 11:14:13 -0700
committerGitHub <noreply@github.com>2021-12-07 11:14:13 -0700
commit2969ceaa6447774f921fe7dd06a39c175e87e45c (patch)
treea2f8ef9487974bf868c630cea0190f8821a1be7e
parent0ed00ad9cdebc2d4dabd8bd6d7c901584963def5 (diff)
downloadvyos-cloud-init-2969ceaa6447774f921fe7dd06a39c175e87e45c.tar.gz
vyos-cloud-init-2969ceaa6447774f921fe7dd06a39c175e87e45c.zip
mock sleep() in azure test (#1137)
-rw-r--r--tests/unittests/sources/test_azure.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/unittests/sources/test_azure.py b/tests/unittests/sources/test_azure.py
index b221a0d7..9728a1e7 100644
--- a/tests/unittests/sources/test_azure.py
+++ b/tests/unittests/sources/test_azure.py
@@ -2981,7 +2981,8 @@ class TestPreprovisioningHotAttachNics(CiTestCase):
m_is_up.side_effect = is_up_mock
- dsa.wait_for_link_up("eth0")
+ with mock.patch('cloudinit.sources.DataSourceAzure.sleep'):
+ dsa.wait_for_link_up("eth0")
self.assertEqual(2, m_try_set_link_up.call_count)
self.assertEqual(2, m_is_up.call_count)