summaryrefslogtreecommitdiff
path: root/tests/unittests/test_datasource/test_scaleway.py
diff options
context:
space:
mode:
authorScott Moser <smoser@brickies.net>2020-11-02 15:41:11 -0500
committerGitHub <noreply@github.com>2020-11-02 15:41:11 -0500
commit0af1ff1eaf593c325b4f53181a572110eb016c50 (patch)
tree2e0dab084dffd4664a6320f15baf374aff008917 /tests/unittests/test_datasource/test_scaleway.py
parentd619f5171ac0ce5b626ef4575ad5f4468e94c987 (diff)
downloadvyos-cloud-init-0af1ff1eaf593c325b4f53181a572110eb016c50.tar.gz
vyos-cloud-init-0af1ff1eaf593c325b4f53181a572110eb016c50.zip
cloudinit: move dmi functions out of util (#622)
This just separates the reading of dmi values into its own file. Some things of note: * left import of util in dmi.py only for 'is_container' It'd be good if is_container was not in util. * just the use of 'util.is_x86' to dmi.py * open() is used directly rather than load_file.
Diffstat (limited to 'tests/unittests/test_datasource/test_scaleway.py')
-rw-r--r--tests/unittests/test_datasource/test_scaleway.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/unittests/test_datasource/test_scaleway.py b/tests/unittests/test_datasource/test_scaleway.py
index 9d82bda9..32f3274a 100644
--- a/tests/unittests/test_datasource/test_scaleway.py
+++ b/tests/unittests/test_datasource/test_scaleway.py
@@ -87,7 +87,7 @@ class TestOnScaleway(CiTestCase):
@mock.patch('cloudinit.util.get_cmdline')
@mock.patch('os.path.exists')
- @mock.patch('cloudinit.util.read_dmi_data')
+ @mock.patch('cloudinit.dmi.read_dmi_data')
def test_not_on_scaleway(self, m_read_dmi_data, m_file_exists,
m_get_cmdline):
self.install_mocks(
@@ -105,7 +105,7 @@ class TestOnScaleway(CiTestCase):
@mock.patch('cloudinit.util.get_cmdline')
@mock.patch('os.path.exists')
- @mock.patch('cloudinit.util.read_dmi_data')
+ @mock.patch('cloudinit.dmi.read_dmi_data')
def test_on_scaleway_dmi(self, m_read_dmi_data, m_file_exists,
m_get_cmdline):
"""
@@ -121,7 +121,7 @@ class TestOnScaleway(CiTestCase):
@mock.patch('cloudinit.util.get_cmdline')
@mock.patch('os.path.exists')
- @mock.patch('cloudinit.util.read_dmi_data')
+ @mock.patch('cloudinit.dmi.read_dmi_data')
def test_on_scaleway_var_run_scaleway(self, m_read_dmi_data, m_file_exists,
m_get_cmdline):
"""
@@ -136,7 +136,7 @@ class TestOnScaleway(CiTestCase):
@mock.patch('cloudinit.util.get_cmdline')
@mock.patch('os.path.exists')
- @mock.patch('cloudinit.util.read_dmi_data')
+ @mock.patch('cloudinit.dmi.read_dmi_data')
def test_on_scaleway_cmdline(self, m_read_dmi_data, m_file_exists,
m_get_cmdline):
"""