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
|
||||
import cinderclient.client
|
||||
from cinderclient import exceptions
|
||||
from cinderclient import utils
|
||||
import cinderclient.v1.client
|
||||
import cinderclient.v2.client
|
||||
|
||||
|
@@ -372,7 +372,8 @@ class FakeHTTPClient(fake_v2.FakeHTTPClient):
|
||||
if action == 'delete':
|
||||
assert 'delete-volumes' in body[action]
|
||||
elif action in ('enable_replication', 'disable_replication',
|
||||
'failover_replication', 'list_replication_targets'):
|
||||
'failover_replication', 'list_replication_targets',
|
||||
'reset_status'):
|
||||
assert action in body
|
||||
else:
|
||||
raise AssertionError("Unexpected action: %s" % action)
|
||||
@@ -418,9 +419,6 @@ class FakeHTTPClient(fake_v2.FakeHTTPClient):
|
||||
def put_group_snapshots_1234(self, **kw):
|
||||
return (200, {}, {'group_snapshot': {}})
|
||||
|
||||
def post_groups_1234_action(self, **kw):
|
||||
return (202, {}, {})
|
||||
|
||||
def get_groups_5678(self, **kw):
|
||||
return (200, {}, {'group':
|
||||
_stub_group(id='5678')})
|
||||
@@ -446,9 +444,6 @@ class FakeHTTPClient(fake_v2.FakeHTTPClient):
|
||||
def post_group_snapshots_5678_action(self, **kw):
|
||||
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):
|
||||
return (202, {}, {})
|
||||
|
||||
|
@@ -22,11 +22,6 @@ from cinderclient.tests.unit.v3 import fakes
|
||||
|
||||
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):
|
||||
cs = fakes.FakeClient(api_version=api_versions.APIVersion('3.7'))
|
||||
services_list = cs.services.list()
|
||||
|
Reference in New Issue
Block a user