Hacking 4.0.0 has introduce new optimal assert checks.
Please refer [1] for more details.
Additionally Hacking has enabled some new checks by default,
and the next update to the new release will introduce failures
in tacker pep8 jobs.
The main impact is from I122d250cab90964c346e9d53046a97c25054bc00.
This patch addresses following -
* Adopt new optimal assert checks.
* [H211] Change assertTrue(isinstance(A, B)) to assertIsInstance(A, B).
* [H212] Change assertEqual(type(A), B) to assertIsInstance(A, B).
* [H214] Change assertTrue(A not in B, message) to the more specific
assertNotIn(A, B, message)
* On bumping up the hacking version, below mention pep8 jobs failed.
This patch address these issues now, when the new hacking release
starts being used it will not cause a disruption.
./tacker/tests/unit/vnflcm/test_controller.py:343:33:
F522 '...'.format(...) has unused named argument(s): expected_type
expected_message = ("Invalid input for field/attribute "
^
./tacker/tests/unit/common/test_csar_utils.py:194:16:
F504 '...' % ... has unused named argument(s): csar
msg = (('The filename "%(manifest)s" is an invalid name.'
^
./tacker/vnfm/nfvo_client.py:191:21:
F523 '...'.format(...) has unused arguments at position(s): 0
"not supported.".format(pipeline_type))
^
[1] https://docs.openstack.org/releasenotes/hacking/unreleased.html#relnotes-4-0-0
Change-Id: Iee059c00df1be212ae69fbc77cb783748da206b1