def test_to_string(self): backup = mock.MagicMock() self.assertIn("Volume Backup", cinder.Backups(self.creds_manager).to_str(backup))
def test_delete(self): backup = mock.MagicMock() self.assertIsNone(cinder.Backups(self.creds_manager).delete(backup)) self.cloud.delete_volume_backup.assert_called_once_with(backup['id'])
def test_disable(self): backup = mock.MagicMock() with self.assertLogs(level='WARNING'): cinder.Backups(self.creds_manager).disable(backup)
def test_list(self): self.assertIs(self.cloud.list_volume_backups.return_value, cinder.Backups(self.creds_manager).list()) self.cloud.list_volume_backups.assert_called_once_with()