Skip to content

Commit

Permalink
Fixes in cli_factory
Browse files Browse the repository at this point in the history
- remove @lru_cache from CLIFactory.__getattr__
- flip output format of cli.Repository.synchronize to from 'csv'
  to 'base' (output is not in csv format here)
  • Loading branch information
vsedmik committed Jan 11, 2024
1 parent 9d5e84c commit 8a9bbc6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion robottelo/cli/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def synchronize(cls, options, return_raw_response=None, timeout=3600000):
cls.command_sub = 'synchronize'
return cls.execute(
cls._construct_command(options),
output_format='csv',
output_format='base',
ignore_stderr=True,
return_raw_response=return_raw_response,
timeout=timeout,
Expand Down
1 change: 0 additions & 1 deletion robottelo/host_helpers/cli_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ def __init__(self, satellite):
self._satellite = satellite
self.__dict__.update(initiate_repo_helpers(self._satellite))

@lru_cache
def __getattr__(self, name):
"""We intercept the usual attribute behavior on this class to emulate make_entity methods
The keys in the dictionary above correspond to potential make_<key> methods
Expand Down
16 changes: 16 additions & 0 deletions tests/foreman/cli/test_capsulecontent.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,19 @@ def test_positive_update_counts(target_sat, module_capsule_configured):
search_rate=5,
max_tries=5,
)


@pytest.mark.parametrize(
'repos_collection',
[
{
'distro': 'rhel8',
'YumRepository': {'url': settings.repos.module_stream_1.url},
'FileRepository': {'url': CUSTOM_FILE_REPO},
}
],
indirect=True,
)
def test_dummie(repos_collection, function_org, function_lce):
repos_collection.setup_content(function_org.id, function_lce.id, upload_manifest=False)
pass

0 comments on commit 8a9bbc6

Please sign in to comment.