iotests: refactor some common qmp result checks into generic pattern

To simplify further conversion.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20231006154125.1068348-10-vsementsov@yandex-team.ru
Signed-off-by: John Snow <jsnow@redhat.com>
This commit is contained in:
Vladimir Sementsov-Ogievskiy 2023-10-06 18:41:19 +03:00 committed by John Snow
parent f7ccc3295b
commit d24eb059fa
5 changed files with 10 additions and 7 deletions

View file

@ -133,9 +133,10 @@ class EncryptionSetupTestCase(iotests.QMPTestCase):
if reOpen:
result = vm.qmp(command, options=[opts])
self.assert_qmp(result, 'return', {})
else:
result = vm.qmp(command, **opts)
self.assert_qmp(result, 'return', {})
self.assert_qmp(result, 'return', {})
###########################################################################