Skip to content

Commit

Permalink
6.15.z-alernative solution for default subscription search option (#1…
Browse files Browse the repository at this point in the history
…5237)

* alernative solution for default subscription search option

* addressed review comments, shorten the for loop
  • Loading branch information
vijaysawant authored Jun 3, 2024
1 parent 0a3dc1c commit eba5320
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/foreman/ui/test_subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,11 @@ def test_positive_access_with_non_admin_user_with_manifest(
default_organization=org,
).create()
with target_sat.ui_session(test_name, user=user.login, password=user_password) as session:
assert (
session.subscription.search(f'name = "{DEFAULT_SUBSCRIPTION_NAME}"')[0]['Name']
== DEFAULT_SUBSCRIPTION_NAME
)
all_subscriptions = session.subscription.read_subscriptions()
assert len(all_subscriptions) > 0
assert any(
[sub['Name'] == DEFAULT_SUBSCRIPTION_NAME for sub in all_subscriptions]
), 'Default subsciption not found'


@pytest.mark.tier2
Expand Down

0 comments on commit eba5320

Please sign in to comment.