get_repo_versions has a misleading name
Ichimonji10 opened this issue · 3 comments
pulp_smash.tests.pulp3.utils.get_repo_versions
doesn't return an iterable of repository versions. Instead, it returns a sorted list of repository version hrefs. Do one of the following:
- Rename the function to
get_repo_versions_hrefs
. - Let the function return an iterable of repository versions.
I'd also consider renaming the function so that repo
is no longer in its name, e.g. get_version_hrefs
. The function accepts a repo
as an argument, which makes the repo
in its name redundant. There are several other functions in this module which follow the same naming convention, including get_added_content
, get_artifact_paths
, and get_content
.
On the flip side, there are also several functions which do include repo
in their name, including delete_repo_version
, get_repo_versions
, and publish_repo
. This inconsistency is something that should probably be taken care of before we split apart Pulp Smash and make an API.
@Ichimonji10, I will work on it. Thanks.
The just-added pulp_smash.tests.pulp3.file.api_v3.test_repo_version.FilterRepoVersionTestCase
might benefit from this change. If the function above is configured to return an iterable of repository versions, its get_repo_versions_attr
function could be simplified.