tests: remove useless variables in db_utils methods

manila/tests/db_utils contains create_share_instance() and
create_share_replica() methods, echo which creates a local
dictionary, updates it from kwargs, and then does nothing
with it.  pep doesn't detect the useless local dictionary
as an unused variable because of the update.

Remove these useless variables.

TrivialFix

Change-Id: I6e3a57ddaabfcd77489d5dd6bda369356ff01627
This commit is contained in:
Tom Barron 2017-01-15 19:41:46 +00:00
parent 6a37e012c3
commit 88cd3a65c9

View File

@ -88,23 +88,12 @@ def create_share(**kwargs):
def create_share_instance(**kwargs): def create_share_instance(**kwargs):
"""Create a share instance object.""" """Create a share instance object."""
instance = {
'host': 'fake',
'status': constants.STATUS_CREATING,
}
instance.update(kwargs)
return db.share_instance_create(context.get_admin_context(), return db.share_instance_create(context.get_admin_context(),
kwargs.pop('share_id'), kwargs) kwargs.pop('share_id'), kwargs)
def create_share_replica(**kwargs): def create_share_replica(**kwargs):
"""Create a share replica object.""" """Create a share replica object."""
replica = {
'host': 'fake',
'status': constants.STATUS_CREATING,
}
replica.update(kwargs)
if 'share_id' not in kwargs: if 'share_id' not in kwargs:
share = create_share() share = create_share()