Beispiel #1
0
 def test_remove_external_volume(self, mock_client):
     vol = volume.Volume(mock_client,
                         'foo',
                         'project',
                         external_name='data')
     vol.remove()
     assert not mock_client.remove_volume.called
Beispiel #2
0
 def test_full_name_volume_with_external_name(self, mock_client):
     vol = volume.Volume(mock_client,
                         'project',
                         'foo',
                         external_name='my-external-foo')
     assert vol.full_name == 'my-external-foo'
Beispiel #3
0
 def test_remove_local_volume(self, mock_client):
     vol = volume.Volume(mock_client, 'foo', 'project')
     vol.remove()
     mock_client.remove_volume.assert_called_once_with('foo_project')
Beispiel #4
0
 def test_full_name_volume(self, mock_client):
     vol = volume.Volume(mock_client, 'project', 'foo')
     assert vol.full_name == 'project_foo'