Skip to content

Commit

Permalink
Docstring fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
damoore044 committed Jan 15, 2024
1 parent dc1921c commit 1bfb5a4
Showing 1 changed file with 13 additions and 21 deletions.
34 changes: 13 additions & 21 deletions tests/foreman/api/test_errata.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,12 @@
:CaseAutomation: Automated
:CaseLevel: System
:CaseComponent: ErrataManagement
:team: Phoenix-content
:TestType: Functional
:CaseImportance: High
:Upstream: No
"""
# For ease of use hc refers to host-collection throughout this document
from time import sleep, time
Expand Down Expand Up @@ -565,9 +560,13 @@ def test_positive_install_in_hc(
_fetch_available_errata_instances(target_sat, client, expected_amount=1)

""" Did installing outdated package, update applicability as expected?
* Call method package_applicability_changed_as_expected *
returns: False if no applicability change occured or expected (package not applicable).
True if applicability changes were expected and occured (package is applicable).
raises: `AssertionError` if any expected changes did not occur, or unexpected changes were found.
Expected: that each outdated package install: updated one or more errata to applicable,
if those now applicable errata(s) were not already applicable to some package prior.
"""
passed_checks = package_applicability_changed_as_expected(
target_sat,
Expand Down Expand Up @@ -708,23 +707,16 @@ def test_positive_install_multiple_in_host(
)
except AssertionError:
# Yum remove did not trigger any errata recalculate task,
# assert YUM_9 packages were/are not present, then continue
assert not set(FAKE_9_YUM_OUTDATED_PACKAGES).intersection(
set(
[
package.filename
for package in target_sat.api.Package(repository=custom_repo_id).search()
]
)
)
assert not set(FAKE_9_YUM_UPDATED_PACKAGES).intersection(
set(
[
package.filename
for package in target_sat.api.Package(repository=custom_repo_id).search()
]
)
# assert any YUM_9 packages were/are not present, then continue
present_packages = set(
[
package.filename
for package in target_sat.api.Package(repository=custom_repo_id).search()
]
)
assert not set(FAKE_9_YUM_OUTDATED_PACKAGES).intersection(present_packages)
assert not set(FAKE_9_YUM_UPDATED_PACKAGES).intersection(present_packages)

# No applicable errata to start
assert rhel_contenthost.applicable_errata_count == 0
present_applicable_packages = []
Expand Down

0 comments on commit 1bfb5a4

Please sign in to comment.