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

[Test Proxy] Add environment_variables fixture #25638

Merged
merged 3 commits into from
Aug 10, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Apply suggestions from code review
Resolve two minor spelling errors
  • Loading branch information
scbedd authored Aug 10, 2022
commit 4908e7fa94ab7d65e1c269a816f8c20e45ffee49
4 changes: 2 additions & 2 deletions tools/azure-sdk-tools/devtools_testutils/proxy_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def sanitize(self, variable: str, value: str) -> str:
return real_value if is_live() else value

def sanitize_batch(self, variables: "Dict[str, str]") -> "Dict[str, str]":
mccoyp marked this conversation as resolved.
Show resolved Hide resolved
"""Registers sanitizers that replace the values of multiple envrionment variables with the provided values.
"""Registers sanitizers that replace the values of multiple environment variables with the provided values.

:param variables: A dictionary mapping environment variable names to values they should be sanitized with.
For example: {"SERICE_CLIENT_ID": "fake_client_id", "SERVICE_ENDPOINT": "https://fake-endpoint.azure.net"}
Expand Down Expand Up @@ -103,7 +103,7 @@ def environment_variables(test_proxy: None) -> EnvironmentVariableSanitizer:
:type test_proxy: None

:returns: An EnvironmentVariableSanitizer object. Calling:
- `sanitize(a, b)` will sanitize the value of environnment variable `a` with value `b`
- `sanitize(a, b)` will sanitize the value of environment variable `a` with value `b`
- `sanitize_batch(dict)` will sanitize the values of all variables in dictionary `dict`
- `get(a)` will return the value of environment variable `a` in the current context (live or playback mode)
See the definition of EnvironmentVariableSanitizer in
Expand Down