api/admin: fix volume info formatting
Newline was put in a wrong place. Fixes QubesOS/qubes-issues#3831
This commit is contained in:
parent
e145e85dba
commit
f9e34eff51
@ -347,7 +347,7 @@ class QubesAdminAPI(qubes.api.AbstractQubesAPI):
|
|||||||
info = ''.join('{}={}\n'.format(key, _serialize(getattr(volume, key)))
|
info = ''.join('{}={}\n'.format(key, _serialize(getattr(volume, key)))
|
||||||
for key in volume_properties)
|
for key in volume_properties)
|
||||||
try:
|
try:
|
||||||
info += '\nis_outdated={}'.format(volume.is_outdated())
|
info += 'is_outdated={}\n'.format(volume.is_outdated())
|
||||||
except NotImplementedError:
|
except NotImplementedError:
|
||||||
pass
|
pass
|
||||||
return info
|
return info
|
||||||
|
@ -363,7 +363,7 @@ class TC_00_VMs(AdminAPITestCase):
|
|||||||
b'private')
|
b'private')
|
||||||
self.assertEqual(value,
|
self.assertEqual(value,
|
||||||
''.join('{p}={p}-value\n'.format(p=p) for p in volume_properties) +
|
''.join('{p}={p}-value\n'.format(p=p) for p in volume_properties) +
|
||||||
'\nis_outdated=False')
|
'is_outdated=False\n')
|
||||||
self.assertEqual(self.vm.volumes.mock_calls,
|
self.assertEqual(self.vm.volumes.mock_calls,
|
||||||
[unittest.mock.call.keys(),
|
[unittest.mock.call.keys(),
|
||||||
unittest.mock.call.__getattr__('__getitem__')('private'),
|
unittest.mock.call.__getattr__('__getitem__')('private'),
|
||||||
|
Loading…
Reference in New Issue
Block a user