Esempio n. 1
0
 def test_to_string(self):
     snapshot = mock.MagicMock()
     self.assertIn("Volume Snapshot ",
                   cinder.Snapshots(self.creds_manager).to_str(snapshot))
Esempio n. 2
0
 def test_delete(self):
     snapshot = mock.MagicMock()
     self.assertIsNone(
         cinder.Snapshots(self.creds_manager).delete(snapshot))
     self.cloud.delete_volume_snapshot.assert_called_once_with(
         snapshot['id'])
Esempio n. 3
0
 def test_disable(self):
     snapshot = mock.MagicMock()
     with self.assertLogs(level='WARNING'):
         cinder.Snapshots(self.creds_manager).disable(snapshot)
Esempio n. 4
0
 def test_list(self):
     self.assertIs(self.cloud.list_volume_snapshots.return_value,
                   cinder.Snapshots(self.creds_manager).list())
     self.cloud.list_volume_snapshots.assert_called_once_with()