Merge "Import module instead of object"
This commit is contained in:
@@ -18,8 +18,7 @@
|
||||
from cinderclient import api_versions
|
||||
from cinderclient.tests.unit import utils
|
||||
from cinderclient.tests.unit.v3 import fakes
|
||||
from cinderclient.v3.volumes import Volume
|
||||
from cinderclient.v3.volumes import VolumeManager
|
||||
from cinderclient.v3 import volumes
|
||||
|
||||
cs = fakes.FakeClient()
|
||||
|
||||
@@ -36,10 +35,10 @@ class VolumesTest(utils.TestCase):
|
||||
'protected': True}}
|
||||
api_version = api_versions.APIVersion('3.1')
|
||||
cs = fakes.FakeClient(api_version)
|
||||
manager = VolumeManager(cs)
|
||||
fake_volume = Volume(manager, {'id': 1234,
|
||||
'name': 'sample-volume'},
|
||||
loaded=True)
|
||||
manager = volumes.VolumeManager(cs)
|
||||
fake_volume = volumes.Volume(manager,
|
||||
{'id': 1234, 'name': 'sample-volume'},
|
||||
loaded=True)
|
||||
fake_volume.upload_to_image(False, 'name', 'bare', 'raw',
|
||||
visibility='public', protected=True)
|
||||
cs.assert_called_anytime('POST', '/volumes/1234/action', body=expected)
|
||||
|
Reference in New Issue
Block a user