nova/nova/tests/functional
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
..
api Merge "Stop using NoAuthMiddleware in tests" 2019-11-15 02:59:54 +00:00
api_sample_tests functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00
compute functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00
db functional: Make '_wait_for_state_change' behave consistently 2019-11-19 09:09:29 +00:00
libvirt functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00
notification_sample_tests functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00
regressions functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00
wsgi functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00
__init__.py Eventlet monkey patching should be as early as possible 2019-03-22 09:27:16 +00:00
api_paste_fixture.py Use external placement in functional tests 2018-12-12 18:46:49 +00:00
api_samples_test_base.py Provide a better error when _verify_response hits a TypeError 2019-11-05 11:31:06 -05:00
fixtures.py Convert driver supported capabilities to compute node provider traits 2019-02-28 23:28:19 +00:00
integrated_helpers.py functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00
test_aggregates.py functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00
test_availability_zones.py functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00
test_boot_from_volume.py functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00
test_compute_mgr.py Fup for the bandwidth series 2019-02-27 10:23:15 +01:00
test_conf_max_attach_disk_devices.py functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00
test_cross_az_attach.py functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00
test_cross_cell_migrate.py functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00
test_images.py functional: Make '_wait_for_state_change' behave consistently 2019-11-19 09:09:29 +00:00
test_instance_actions.py functional: Make '_wait_for_state_change' behave consistently 2019-11-19 09:09:29 +00:00
test_json_filter.py functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00
test_legacy_v2_compatible_wrapper.py functional: Make '_wait_for_state_change' behave consistently 2019-11-19 09:09:29 +00:00
test_list_servers_ip_filter.py trivial: Change name of network provided by NeutronFixture 2019-10-05 15:40:28 +01:00
test_login.py update api_samples code to use better variables 2015-12-14 11:23:26 +08:00
test_metadata.py nova-net: Remove final references to nova-net from functional tests 2019-11-29 17:20:02 +00:00
test_middleware.py Stop using NoAuthMiddleware in tests 2019-10-14 11:43:52 -05:00
test_multiattach.py functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00
test_nova_manage.py functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00
test_policy.py functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00
test_report_client.py Move compute_node_to_inventory_dict to test-only code 2019-11-07 17:34:33 -05:00
test_scheduler.py functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00
test_server_external_events.py functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00
test_server_faults.py functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00
test_server_group.py functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00
test_servers.py functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00
test_servers_provider_tree.py functional: Remove 'api' parameter 2019-12-06 15:35:33 +00:00