Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use server_config as named argument only #1152

Merged

Conversation

tpapaioa
Copy link
Contributor

@tpapaioa tpapaioa commented May 28, 2024

Description of changes

Update all entity initialization calls to pass server_config as a named kwarg instead of as a positional arg.

Fixes #1038

pytest_fixtures/component/taxonomy.py:43: in module_org
    return module_target_sat.api.Organization().create()
../../lib64/python3.12/site-packages/nailgun/entities.py:5803: in create
    return type(self)(
E   TypeError: Organization.__init__() got multiple values for argument 'server_config'
Functional demonstration

nailgun tests:

# make test
python -m unittest discover --start-directory tests --top-level-directory .
................................................................................................................................................................................................................................................................................
----------------------------------------------------------------------
Ran 272 tests in 5.584s

OK

robottelo tests:

$ pytest tests/foreman/api/test_organization.py 
[...]
tests/foreman/api/test_organization.py ...........................................     [100%]
=== 43 passed, 175 warnings in 215.71s (0:03:35) ===

robottelo PRT:
job/robottelo-pr-testing/7142/console:

10:45:45  ================= 43 passed, 237 warnings in 812.40s (0:13:32) =================
Additional Information

@tpapaioa tpapaioa added CherryPick PR needs CherryPick to previous branches 6.13.z 6.14.z 6.15.z labels May 28, 2024
@tpapaioa tpapaioa self-assigned this May 28, 2024
@tpapaioa tpapaioa marked this pull request as ready for review May 28, 2024 14:10
Copy link
Contributor

@damoore044 damoore044 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack nice work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.13.z 6.14.z 6.15.z CherryPick PR needs CherryPick to previous branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

x.__init__() got multiple values for argument 'server_config'
3 participants