Skip to content

Commit

Permalink
fixed sanity suite, AttributeError due to not matching scope (#14309)
Browse files Browse the repository at this point in the history
(cherry picked from commit 063ac02)
  • Loading branch information
omkarkhatavkar authored and ogajduse committed Mar 11, 2024
1 parent 1c3a2fc commit c504079
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 2 additions & 4 deletions robottelo/host_helpers/satellite_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,8 @@ def upload_manifest(self, org_id, manifest=None, interface='API', timeout=None):
:returns: the manifest upload result
"""
if (
not isinstance(manifest, bytes | io.BytesIO)
and not hasattr(manifest, 'content')
or manifest.content is None
if not isinstance(manifest, bytes | io.BytesIO) and (
not hasattr(manifest, 'content') or manifest.content is None
):
manifest = clone()
if timeout is None:
Expand Down
4 changes: 3 additions & 1 deletion tests/foreman/api/test_errata.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@

@pytest.fixture(scope='module')
def activation_key(module_org, module_lce, module_target_sat):
module_target_sat.api.ActivationKey(environment=module_lce, organization=module_org).create()
return module_target_sat.api.ActivationKey(
environment=module_lce, organization=module_org
).create()


@pytest.fixture(scope='module')
Expand Down
2 changes: 1 addition & 1 deletion tests/foreman/cli/test_satellitesync.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def function_synced_rh_repo(request, target_sat, function_sca_manifest_org):
# Update the download policy to 'immediate' and sync
target_sat.cli.Repository.update({'download-policy': 'immediate', 'id': repo['id']})
target_sat.cli.Repository.synchronize({'id': repo['id']}, timeout=7200000)
repo = target_sat.cli.Repository.info(
return target_sat.cli.Repository.info(
{
'organization-id': function_sca_manifest_org.id,
'name': repo_dict['name'],
Expand Down
2 changes: 1 addition & 1 deletion tests/foreman/longrun/test_inc_updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def dev_lce(module_entitlement_manifest_org):

@pytest.fixture(scope='module')
def qe_lce(module_entitlement_manifest_org, dev_lce):
entities.LifecycleEnvironment(
return entities.LifecycleEnvironment(
name='QE', prior=dev_lce, organization=module_entitlement_manifest_org
).create()

Expand Down

0 comments on commit c504079

Please sign in to comment.