Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 23, 2024
1 parent 3d7619c commit ab08efc
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions tests/foreman/ui/test_contentview.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
:CaseImportance: High
"""

from airgun.exceptions import NoSuchElementException
from fauxfactory import gen_string
import pytest
Expand Down Expand Up @@ -228,7 +229,9 @@ def test_file_cv_display(session, target_sat, module_org, module_product):
@pytest.mark.upgrade
@pytest.mark.tier2
def test_positive_delete_cv_promoted_to_multi_env(
session, target_sat, module_org,
session,
target_sat,
module_org,
):
"""Delete the published content view version promoted to multiple
environments. Delete the entire content view, with a promoted version to
Expand All @@ -253,7 +256,7 @@ def test_positive_delete_cv_promoted_to_multi_env(
repo = target_sat.cli_factory.RepositoryCollection(
repositories=[target_sat.cli_factory.YumRepository(url=settings.repos.yum_0.url)]
)
repo.setup(module_org.id, synchronize=False) # sync=True later
repo.setup(module_org.id, synchronize=False) # sync=True later
cv, lce = repo.setup_content_view(module_org.id)
repo_name = repo.repos_info[0]['name']

Expand All @@ -266,7 +269,8 @@ def test_positive_delete_cv_promoted_to_multi_env(
)
# repo name found in CVV's repositories tab
assert (
repo_name == session.contentview_new.read_version_table(
repo_name
== session.contentview_new.read_version_table(
entity_name=cv['name'],
version=VERSION,
tab_name='repositories',
Expand All @@ -282,7 +286,7 @@ def test_positive_delete_cv_promoted_to_multi_env(
assert cv['name'] == lce_values['content_views']['resources'][0]['Name']
library_values = session.lifecycleenvironment.read('Library')
assert cv['name'] == library_values['content_views']['resources'][0]['Name']

# Delete the promoted CVV
session.contentview_new.delete_version(
entity_name=cv['name'],
Expand All @@ -301,8 +305,10 @@ def test_positive_delete_cv_promoted_to_multi_env(
session.contentview_new.publish(entity_name=cv['name'], promote=True, lce=lce['name'])
cv_info = session.contentview_new.search(cv['name'])[0]
assert cv_info['Latest version'] == 'Version 2.0'
cvv_values = session.contentview_new.read_cv(entity_name=cv['name'], version_name='Version 2.0')

cvv_values = session.contentview_new.read_cv(
entity_name=cv['name'], version_name='Version 2.0'
)

# promotion of CVV added the CV to both environments again
assert 'Library' in cvv_values['Environments']
assert lce['name'] in cvv_values['Environments']
Expand Down

0 comments on commit ab08efc

Please sign in to comment.