Skip to content

Commit

Permalink
addressed review comments, shorten the for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaysawant committed May 31, 2024
1 parent 483590c commit ecffe7c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tests/foreman/ui/test_subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,9 @@ def test_positive_access_with_non_admin_user_with_manifest(
with target_sat.ui_session(test_name, user=user.login, password=user_password) as session:
all_subscriptions = session.subscription.read_subscriptions()
assert len(all_subscriptions) > 0
for subscription in all_subscriptions:
if subscription['Name'] == DEFAULT_SUBSCRIPTION_NAME:
assert True
break
else:
pytest.fail("Default subsciption not found")
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 ecffe7c

Please sign in to comment.