Skip to content

Commit

Permalink
update test to match change
Browse files Browse the repository at this point in the history
  • Loading branch information
mstrlc committed Jun 21, 2023
1 parent d283933 commit a8dd2cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions nailgun/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -6979,7 +6979,7 @@ def __init__(self, server_config=None, **kwargs):

def path(self, which=None):
"""Extend ``nailgun.entity_mixins.Entity.path``."""
if which in ("enable_connector"):
if which in ("enable_connector",):
return f'{super().path(which="base")}/{which}'
return super().path(which)

Expand Down Expand Up @@ -8567,7 +8567,7 @@ def path(self, which=None):
``super`` is called otherwise.
"""
if which in ("sync"):
if which in ("sync",):
return f'{super().path(which="base")}/{which}'
return super().path(which)

Expand Down
7 changes: 6 additions & 1 deletion tests/test_entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -2193,7 +2193,6 @@ def setUpClass(cls):
(entities.Repository(**generic).module_streams, 'get'),
(entities.Repository(**generic).remove_content, 'put'),
(entities.Repository(**generic).sync, 'post'),
(entities.RHCloud(**generic).enable_connector, 'post'),
(entities.ScapContents(**generic).xml, 'get'),
(entities.SmartProxy(**generic).import_puppetclasses, 'post'),
(entities.SmartProxy(**generic).refresh, 'put'),
Expand All @@ -2203,12 +2202,18 @@ def setUpClass(cls):
(entities.Template(**generic).exports, 'post'),
(entities.VirtWhoConfig(**generic).deploy_script, 'get'),
)
plain_taxonomy = {'server_config': cfg, 'organization': 1, 'location': 2}
repo_set = {'server_config': cfg, 'id': 1, 'product': 2}
snapshot = {'server_config': cfg, 'id': 'snapshot-1', 'host': 1}
cls.intelligent_methods_requests = (
(entities.RepositorySet(**repo_set).available_repositories, 'get', {'product_id': 2}),
(entities.RepositorySet(**repo_set).disable, 'put', {'product_id': 2}),
(entities.RepositorySet(**repo_set).enable, 'put', {'product_id': 2}),
(
entities.RHCloud(**plain_taxonomy).enable_connector,
'post',
{'organization_id': 1, 'location_id': 2},
),
(entities.Snapshot(**snapshot).revert, 'put', {}),
)

Expand Down

0 comments on commit a8dd2cb

Please sign in to comment.