class mock.Mock does not exist method called_once_with, it just exists
method assert_called_once_with. Currently there are still ome places
where we use called_once_with method, this patch let's correct it.
NOTE: called_once_with() does nothing because it's a mock object.
Closes-Bug: #
1544522
Change-Id: Iac7c029a1cc66439f43d441bc6d0832686536961
res = self._get_resp(vol.id)
self.assertEqual(202, res.status_int, res)
- mock_rpcapi.called_once_with(self.ctxt, mock.ANY, unmanage_only=True)
+ mock_rpcapi.assert_called_once_with(self.ctxt, mock.ANY, True)
vol = objects.volume.Volume.get_by_id(self.ctxt, vol.id)
self.assertEqual('deleting', vol.status)
db.volume_destroy(self.ctxt, vol.id)
self.assertRaises(OSError, self.driver.put_container,
FAKE_CONTAINER)
os.path.exists.assert_called_once_with(path)
- os.makedirs.called_once_with(path)
+ os.makedirs.assert_called_once_with(path)
self.assertEqual(0, os.chmod.call_count)
def test_get_container_entries(self):
mock_init):
stats = self.driver.get_volume_stats(True)
self.assertEqual('FC', stats['storage_protocol'])
- mock_get_storage_usage.called_once_with(64702)
+ mock_get_storage_usage.assert_called_once_with()
@mock.patch.object(dell_storagecenter_api.StorageCenterApi,
'find_sc',