nova/nova/tests/functional/wsgi
Stephen Finucane 7ae1a10913 functional: Remove 'api' parameter
Pretty much every test case in 'nova.tests.functional' defines an 'api'
attribute, and many define an 'admin_api' attribute. We can pull these
from the class rather than explicitly passing them to helpers. Rework
things so this happens.

Note that the bulk of the changes here are in the
'nova/tests/functional/integrated_helpers.py' file. The rest of the
changes were auto-generated using the following script (my sed-fu is
non-existent):

  $ cd nova/tests/functional
  $ python3
  >>> import glob
  >>> import re
  >>> pattern = r'_state_change\((\n\s+)?self\.(admin_)?api,\s+'
  >>> replace = r'_state_change(\1'
  >>> for path in glob.glob('*.py') + glob.glob('*/*.py'):
  ...     with open(path) as fh:
  ...         data = fh.read()
  ...     new = re.sub(pattern, replace, data, flags=re.MULTILINE)
  ...     if new != data:
  ...         with open(path, 'w') as fh:
  ...             fh.write(new)
  ...
  >>> quit()

(ditto for the other substitutions)

Some manual fixups were required after, which pre-commit highlighted :)

Change-Id: I8c96b337f32148f8f5899c9b87af331b1fa41424
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-12-06 15:35:33 +00:00
..
__init__.py nova flavor manage functional test 2015-02-20 08:50:44 -05:00
test_flavor_manage.py Remove compatibility code for flavors 2017-09-05 10:36:10 -04:00
test_interfaces.py nova-net: Remove 'USE_NEUTRON' from functional tests 2019-11-22 16:03:17 +00:00
test_secgroup.py Enable global hacking checks and removed local checks 2017-02-10 15:09:37 +01:00
test_servers.py functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00
test_services.py functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00