Skip to content

Commit

Permalink
Fix missing docparams in _testing/
Browse files Browse the repository at this point in the history
  • Loading branch information
sirosen committed Aug 27, 2023
1 parent bac486d commit d729089
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/globus_sdk/_testing/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ def get_response_set(set_id: t.Any) -> ResponseSet:
"""
Lookup a ``ResponseSet`` as in ``load_response_set``, but without
activating it.
:param set_id: The ID used to retrieve the response set. Typically a string, but
could be any key used to register a response set.
:type set_id: any
"""
# first priority: check the explicit registry
if set_id in _RESPONSE_SET_REGISTRY:
Expand Down Expand Up @@ -99,6 +103,13 @@ def load_response_set(
Optionally lookup a response set and activate all of its responses. If
passed a ``ResponseSet``, activate it, otherwise the first argument is an
ID used for lookup.
:param set_id: The ID used to retrieve the response set. Typically a string, but
could be any key used to register a response set.
:type set_id: any
:param requests_mock: A ``responses`` library mock to use for response mocking,
defaults to the ``responses` default
:type requests_mock: responses.RequestsMock, optional
"""
if isinstance(set_id, ResponseSet):
return set_id.activate_all(requests_mock=requests_mock)
Expand All @@ -118,6 +129,16 @@ def load_response(
``RegisteredResponse``, activate it, otherwise the first argument is an ID
of a ``ResponseSet`` used for lookup. By default, looks for the response
registered under ``case="default"``.
:param set_id: The ID used to retrieve the response set. Typically a string, but
could be any key used to register a response set.
:type set_id: any
:param case: The name of a case within the response set to load, ignoring all other
registered mocks in the response set
:type case: str, optional
:param requests_mock: A ``responses`` library mock to use for response mocking,
defaults to the ``responses` default
:type requests_mock: responses.RequestsMock, optional
"""
if isinstance(set_id, RegisteredResponse):
return set_id.add(requests_mock=requests_mock)
Expand Down

0 comments on commit d729089

Please sign in to comment.