summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-03-14 09:45:11 -0400
committerScott Moser <smoser@ubuntu.com>2016-03-14 09:45:11 -0400
commit97f81cbecf39c340b6c000d62536fcb7f1ef87b0 (patch)
tree7890a7ca3535cd66b22a462acd207fbae2305956 /tests
parent41470d29f5888baf7ec78e170cc0d6d981dcf63e (diff)
parent001057f01e698c3ca0c078d9535f05fdebec2d80 (diff)
downloadvyos-cloud-init-97f81cbecf39c340b6c000d62536fcb7f1ef87b0.tar.gz
vyos-cloud-init-97f81cbecf39c340b6c000d62536fcb7f1ef87b0.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')
-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 0a986fec..37a984ac 100644
--- a/tests/unittests/test_util.py
+++ b/tests/unittests/test_util.py
@@ -389,7 +389,7 @@ class TestReadDMIData(helpers.FilesystemMockingTestCase):
# uninitialized dmi values show as \xff, return those as .
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)