Update hacking
This patch updates the version of hacking to be consistent with octavia.
It is also required for flake8 to understand f-strings correctly.
Along with this version update, the patch fixes issues in the code found
by the new versions.
This patch also removes O349 check for importing mock since flake8 has
added H216 which does the same check.
Change-Id: I8e49fc19faff59b2811a7ee09b7ccaa286f73d82
diff --git a/octavia_tempest_plugin/tests/waiters.py b/octavia_tempest_plugin/tests/waiters.py
index fa6c112..820831a 100644
--- a/octavia_tempest_plugin/tests/waiters.py
+++ b/octavia_tempest_plugin/tests/waiters.py
@@ -48,8 +48,8 @@
:returns: The object details from the show client.
"""
start = int(time.time())
- LOG.info('Waiting for {name} status to update to {status}'.format(
- name=show_client.__name__, status=status))
+ LOG.info('Waiting for %s status to update to %s',
+ show_client.__name__, status)
while True:
if status == const.DELETED:
try:
@@ -65,8 +65,8 @@
object_details = response
if object_details[status_key] == status:
- LOG.info('{name}\'s status updated to {status}.'.format(
- name=show_client.__name__, status=status))
+ LOG.info('%s\'s status updated to %s.',
+ show_client.__name__, status)
return object_details
elif object_details[status_key] == 'ERROR' and not error_ok:
message = ('{name} {field} updated to an invalid state of '
@@ -148,8 +148,8 @@
:returns: None
"""
start = int(time.time())
- LOG.info('Waiting for {name} status to update to DELETED or be not '
- 'found(404)'.format(name=show_client.__name__))
+ LOG.info('Waiting for %s status to update to DELETED or be not found(404)',
+ show_client.__name__)
while True:
try:
response = show_client(id, **kwargs)
@@ -162,8 +162,8 @@
object_details = response
if object_details[status_key] == const.DELETED:
- LOG.info('{name}\'s status updated to DELETED.'.format(
- name=show_client.__name__))
+ LOG.info('%s\'s status updated to DELETED.',
+ show_client.__name__)
return
elif int(time.time()) - start >= check_timeout:
message = (