Skip to content

Commit

Permalink
fix pre-commit issue
Browse files Browse the repository at this point in the history
  • Loading branch information
yanpliu committed Nov 20, 2023
1 parent caf5f42 commit 1ce96d4
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions pytest_fixtures/component/virtwho_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
LOGGEDOUT = 'Logged out.'


@pytest.fixture()
@pytest.fixture
def org_module(request, default_org, module_sca_manifest_org):
if 'sca' in request.module.__name__.split('.')[-1]:
org_module = module_sca_manifest_org
Expand All @@ -21,7 +21,7 @@ def org_module(request, default_org, module_sca_manifest_org):
return org_module


@pytest.fixture()
@pytest.fixture
def org_session(request, session, session_sca):
if 'sca' in request.module.__name__.split('.')[-1]:
org_session = session_sca
Expand All @@ -30,7 +30,7 @@ def org_session(request, session, session_sca):
return org_session


@pytest.fixture()
@pytest.fixture
def form_data_cli(request, target_sat, org_module):
hypervisor_type = request.module.__name__.split('.')[-1].split('_', 1)[-1]
if 'esx' in hypervisor_type:
Expand Down Expand Up @@ -105,7 +105,7 @@ def form_data_cli(request, target_sat, org_module):
return form


@pytest.fixture()
@pytest.fixture
def form_data_api(request, target_sat, org_module):
hypervisor_type = request.module.__name__.split('.')[-1].split('_', 1)[-1]
if 'esx' in hypervisor_type:
Expand Down Expand Up @@ -180,7 +180,7 @@ def form_data_api(request, target_sat, org_module):
return form


@pytest.fixture()
@pytest.fixture
def form_data_ui(request, target_sat, org_module):
hypervisor_type = request.module.__name__.split('.')[-1].split('_', 1)[-1]
if 'esx' in hypervisor_type:
Expand Down Expand Up @@ -235,15 +235,15 @@ def form_data_ui(request, target_sat, org_module):
return form


@pytest.fixture()
@pytest.fixture
def virtwho_config_cli(form_data_cli, target_sat):
virtwho_config_cli = target_sat.cli.VirtWhoConfig.create(form_data_cli)['general-information']
yield virtwho_config_cli
target_sat.cli.VirtWhoConfig.delete({'name': virtwho_config_cli['name']})
assert not target_sat.cli.VirtWhoConfig.exists(search=('name', form_data_cli['name']))


@pytest.fixture()
@pytest.fixture
def virtwho_config_api(form_data_api, target_sat):
virtwho_config_api = target_sat.api.VirtWhoConfig(**form_data_api).create()
yield virtwho_config_api
Expand All @@ -253,7 +253,7 @@ def virtwho_config_api(form_data_api, target_sat):
)


@pytest.fixture()
@pytest.fixture
def virtwho_config_ui(form_data_ui, target_sat, org_session):
name = gen_string('alpha')
form_data_ui['name'] = name
Expand All @@ -264,7 +264,7 @@ def virtwho_config_ui(form_data_ui, target_sat, org_session):
assert not org_session.virtwho_configure.search(name)


@pytest.fixture()
@pytest.fixture
def deploy_type_cli(
request,
org_module,
Expand All @@ -286,10 +286,10 @@ def deploy_type_cli(
hypervisor_name, guest_name = deploy_configure_by_script(
script, form_data_cli['hypervisor-type'], debug=True, org=org_module.label
)
yield hypervisor_name, guest_name
return hypervisor_name, guest_name


@pytest.fixture()
@pytest.fixture
def deploy_type_api(
request,
org_module,
Expand All @@ -312,10 +312,10 @@ def deploy_type_api(
debug=True,
org=org_module.label,
)
yield hypervisor_name, guest_name
return hypervisor_name, guest_name


@pytest.fixture()
@pytest.fixture
def deploy_type_ui(
request,
org_module,
Expand All @@ -336,10 +336,10 @@ def deploy_type_ui(
hypervisor_name, guest_name = deploy_configure_by_script(
script, form_data_ui['hypervisor_type'], debug=True, org=org_module.label
)
yield hypervisor_name, guest_name
return hypervisor_name, guest_name


@pytest.fixture()
@pytest.fixture
def delete_host(form_data, target_sat):
guest_name, _ = get_guest_info(form_data['hypervisor_type'])
results = target_sat.api.Host().search(query={'search': guest_name})
Expand Down

0 comments on commit 1ce96d4

Please sign in to comment.