Skip to content

Commit

Permalink
fix cli method description, condense logic
Browse files Browse the repository at this point in the history
  • Loading branch information
sambible committed Mar 14, 2024
1 parent 0ca683a commit f127539
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion robottelo/cli/contentview.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,6 @@ def component_list(cls, options=None):

@classmethod
def list(cls, options=None):
"""List components attached to the content view"""
"""List information about content views"""
cls.command_sub = 'list'
return cls.execute(cls._construct_command(options), output_format='csv')
5 changes: 2 additions & 3 deletions tests/foreman/cli/test_contentview.py
Original file line number Diff line number Diff line change
Expand Up @@ -4085,7 +4085,7 @@ def test_show_all_repo_ids(self, module_org, module_product, module_target_sat):
# Create 30 repositories
repolist = []
id_list = []
for _i in range(30):
for _ in range(30):
repo = module_target_sat.api.Repository(
product=module_product,
checksum_type='sha256',
Expand All @@ -4094,7 +4094,6 @@ def test_show_all_repo_ids(self, module_org, module_product, module_target_sat):
).create()
repolist.append(repo)
id_list.append(str(repo.id))
id_list = ', '.join(id_list)
# Sync and publish all repos
cv = module_target_sat.api.ContentView(
organization=module_org, repository=repolist
Expand All @@ -4104,7 +4103,7 @@ def test_show_all_repo_ids(self, module_org, module_product, module_target_sat):
cv.publish()
# Run content-view list --name cv.name
list_info = module_target_sat.cli.ContentView.list({'name': cv.name})
assert (list_info[0]['repository-ids']) == id_list
assert (list_info[0]['repository-ids']) == ', '.join(id_list)


class TestContentViewFileRepo:
Expand Down

0 comments on commit f127539

Please sign in to comment.