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