Fix wrong assertion methods in unit tests

Replace 'called_once_with' with 'assert_called_once_with'.
Replace 'asssert_called_once_with' with 'assert_called_once_with'.

Change-Id: Ie5f07de8c09cf4764223278acf1724c20c8d7694
Partial-Bug: 1989280
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
This commit is contained in:
Takashi Natsume 2022-09-05 00:04:01 +09:00
parent 2715218e2b
commit e4da0146a5
1 changed files with 3 additions and 3 deletions

View File

@ -73,7 +73,7 @@ class TestVolume(base.BaseTest):
result = vol.snapshots
mock_get_snaps.called_once_with(vol.id)
mock_get_snaps.assert_called_once_with(volume_id=vol.id)
self.assertEqual(snaps, result)
self.assertEqual(snaps, vol._snapshots)
self.assertEqual(1, len(vol._ovo.snapshots))
@ -100,7 +100,7 @@ class TestVolume(base.BaseTest):
result = vol.connections
mock_get_conns.called_once_with(volume_id=vol.id)
mock_get_conns.assert_called_once_with(volume_id=vol.id)
self.assertEqual(conns, result)
self.assertEqual(conns, vol._connections)
self.assertEqual(1, len(vol._ovo.volume_attachment))
@ -474,7 +474,7 @@ class TestVolume(base.BaseTest):
mock_remove_export.assert_called_once_with()
for c in connections:
c.detach.asssert_called_once_with()
c.detach.assert_called_once_with()
def test__snapshot_removed_not_loaded(self):
vol = objects.Volume(self.backend,