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