Пример #1
0
 def test_to_string(self):
     backup = mock.MagicMock()
     self.assertIn("Volume Backup",
                   cinder.Backups(self.creds_manager).to_str(backup))
Пример #2
0
 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'])
Пример #3
0
 def test_disable(self):
     backup = mock.MagicMock()
     with self.assertLogs(level='WARNING'):
         cinder.Backups(self.creds_manager).disable(backup)
Пример #4
0
 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()