Fix method/module redefinition errors
These are caught by F811, but that test is currently disabled because it fails on @api_versions.wraps() decorated methods. Just clean up these errors for now. Change-Id: I42aed024352f798ebafddeb6f12880d8726360fe
This commit is contained in:
@@ -25,7 +25,6 @@ import six
|
|||||||
from cinderclient import api_versions
|
from cinderclient import api_versions
|
||||||
import cinderclient.client
|
import cinderclient.client
|
||||||
from cinderclient import exceptions
|
from cinderclient import exceptions
|
||||||
from cinderclient import utils
|
|
||||||
import cinderclient.v1.client
|
import cinderclient.v1.client
|
||||||
import cinderclient.v2.client
|
import cinderclient.v2.client
|
||||||
|
|
||||||
|
@@ -372,7 +372,8 @@ class FakeHTTPClient(fake_v2.FakeHTTPClient):
|
|||||||
if action == 'delete':
|
if action == 'delete':
|
||||||
assert 'delete-volumes' in body[action]
|
assert 'delete-volumes' in body[action]
|
||||||
elif action in ('enable_replication', 'disable_replication',
|
elif action in ('enable_replication', 'disable_replication',
|
||||||
'failover_replication', 'list_replication_targets'):
|
'failover_replication', 'list_replication_targets',
|
||||||
|
'reset_status'):
|
||||||
assert action in body
|
assert action in body
|
||||||
else:
|
else:
|
||||||
raise AssertionError("Unexpected action: %s" % action)
|
raise AssertionError("Unexpected action: %s" % action)
|
||||||
@@ -418,9 +419,6 @@ class FakeHTTPClient(fake_v2.FakeHTTPClient):
|
|||||||
def put_group_snapshots_1234(self, **kw):
|
def put_group_snapshots_1234(self, **kw):
|
||||||
return (200, {}, {'group_snapshot': {}})
|
return (200, {}, {'group_snapshot': {}})
|
||||||
|
|
||||||
def post_groups_1234_action(self, **kw):
|
|
||||||
return (202, {}, {})
|
|
||||||
|
|
||||||
def get_groups_5678(self, **kw):
|
def get_groups_5678(self, **kw):
|
||||||
return (200, {}, {'group':
|
return (200, {}, {'group':
|
||||||
_stub_group(id='5678')})
|
_stub_group(id='5678')})
|
||||||
@@ -446,9 +444,6 @@ class FakeHTTPClient(fake_v2.FakeHTTPClient):
|
|||||||
def post_group_snapshots_5678_action(self, **kw):
|
def post_group_snapshots_5678_action(self, **kw):
|
||||||
return (202, {}, {})
|
return (202, {}, {})
|
||||||
|
|
||||||
def get_group_snapshots_5678(self, **kw):
|
|
||||||
return (200, {}, {'group_snapshot': _stub_group_snapshot(id='5678')})
|
|
||||||
|
|
||||||
def delete_group_snapshots_1234(self, **kw):
|
def delete_group_snapshots_1234(self, **kw):
|
||||||
return (202, {}, {})
|
return (202, {}, {})
|
||||||
|
|
||||||
|
@@ -22,11 +22,6 @@ from cinderclient.tests.unit.v3 import fakes
|
|||||||
|
|
||||||
class ServicesTest(utils.TestCase):
|
class ServicesTest(utils.TestCase):
|
||||||
|
|
||||||
def test_api_version(self):
|
|
||||||
client = fakes.FakeClient(version_header='3.0')
|
|
||||||
svs = client.services.server_api_version()
|
|
||||||
[self.assertIsInstance(s, services.Service) for s in svs]
|
|
||||||
|
|
||||||
def test_list_services_with_cluster_info(self):
|
def test_list_services_with_cluster_info(self):
|
||||||
cs = fakes.FakeClient(api_version=api_versions.APIVersion('3.7'))
|
cs = fakes.FakeClient(api_version=api_versions.APIVersion('3.7'))
|
||||||
services_list = cs.services.list()
|
services_list = cs.services.list()
|
||||||
|
Reference in New Issue
Block a user