summaryrefslogtreecommitdiff
path: root/tests/unittests
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-03-14 09:21:02 -0400
committerScott Moser <smoser@ubuntu.com>2016-03-14 09:21:02 -0400
commit03f80fa62eb85270a7a96850c5e689a1c4bc0049 (patch)
tree2be047c5111118b18f6c959db7e5e264c7d5958e /tests/unittests
parentbe38478cd8e11b0e29c70bb881a676628e9f74d5 (diff)
downloadvyos-cloud-init-03f80fa62eb85270a7a96850c5e689a1c4bc0049.tar.gz
vyos-cloud-init-03f80fa62eb85270a7a96850c5e689a1c4bc0049.zip
change return value for dmi data of all \xff to be ""
Previously we returned a string of "." the same length as the dmi field. That seems confusing to the user as "." would seem like a valid response when in fact this value should not be considered valid. So now, in this case, return empty string.
Diffstat (limited to 'tests/unittests')
-rw-r--r--tests/unittests/test_util.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/unittests/test_util.py b/tests/unittests/test_util.py
index 542e4075..bdee9719 100644
--- a/tests/unittests/test_util.py
+++ b/tests/unittests/test_util.py
@@ -388,7 +388,7 @@ class TestReadDMIData(helpers.FilesystemMockingTestCase):
def test_dots_returned_instead_of_foxfox(self):
my_len = 32
dmi_value = b'\xff' * my_len + b'\n'
- expected = '.' * my_len
+ expected = ""
dmi_key = 'system-product-name'
sysfs_key = 'product_name'
self._create_sysfs_file(sysfs_key, dmi_value)