summaryrefslogtreecommitdiffstats
path: root/tests/qemu-iotests/041
diff options
context:
space:
mode:
authorKevin Wolf2018-11-20 18:12:21 +0100
committerKevin Wolf2018-11-21 10:30:05 +0100
commitfa1cfb40262b8a60e0f93b70491660f242638f81 (patch)
treebd02b41ddccad19e4284b07df4b911d742fb2e2f /tests/qemu-iotests/041
parentiotests: Replace time.clock() with Timeout (diff)
downloadqemu-fa1cfb40262b8a60e0f93b70491660f242638f81.tar.gz
qemu-fa1cfb40262b8a60e0f93b70491660f242638f81.tar.xz
qemu-fa1cfb40262b8a60e0f93b70491660f242638f81.zip
iotests: Replace assertEquals() with assertEqual()
TestCase.assertEquals() is deprecated since Python 2.7. Recent Python versions print a warning when the function is called, which makes test cases fail. Replace it with the preferred spelling assertEqual(). Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/041')
-rwxr-xr-xtests/qemu-iotests/0416
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041
index 3615011d98..26bf1701eb 100755
--- a/tests/qemu-iotests/041
+++ b/tests/qemu-iotests/041
@@ -469,7 +469,7 @@ new_state = "1"
self.assert_qmp(event, 'data/id', 'drive0')
event = self.vm.get_qmp_event(wait=True)
- self.assertEquals(event['event'], 'BLOCK_JOB_ERROR')
+ self.assertEqual(event['event'], 'BLOCK_JOB_ERROR')
self.assert_qmp(event, 'data/device', 'drive0')
self.assert_qmp(event, 'data/operation', 'read')
result = self.vm.qmp('query-block-jobs')
@@ -494,7 +494,7 @@ new_state = "1"
self.assert_qmp(event, 'data/id', 'drive0')
event = self.vm.get_qmp_event(wait=True)
- self.assertEquals(event['event'], 'BLOCK_JOB_ERROR')
+ self.assertEqual(event['event'], 'BLOCK_JOB_ERROR')
self.assert_qmp(event, 'data/device', 'drive0')
self.assert_qmp(event, 'data/operation', 'read')
result = self.vm.qmp('query-block-jobs')
@@ -625,7 +625,7 @@ new_state = "1"
self.assert_qmp(result, 'return', {})
event = self.vm.event_wait(name='BLOCK_JOB_ERROR')
- self.assertEquals(event['event'], 'BLOCK_JOB_ERROR')
+ self.assertEqual(event['event'], 'BLOCK_JOB_ERROR')
self.assert_qmp(event, 'data/device', 'drive0')
self.assert_qmp(event, 'data/operation', 'write')
result = self.vm.qmp('query-block-jobs')