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

Sync with downstream #320

Merged
merged 1 commit into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 4 additions & 2 deletions tests/unit/utils/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,8 @@ def test_invalid_config_for_memory_cache():
password_path: pwd123
""",
InvalidConfigurationError,
"memory conversation cache type is specified, but memory configuration is missing",
"memory conversation cache type is specified,"
" but memory configuration is missing",
)

check_expected_exception(
Expand Down Expand Up @@ -459,7 +460,8 @@ def test_invalid_config_for_redis_cache():
max_entries: 1000
""",
InvalidConfigurationError,
"redis conversation cache type is specified, but redis configuration is missing",
"redis conversation cache type is specified,"
" but redis configuration is missing",
)

check_expected_exception(
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/utils/test_errors_parsing.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Unit Test for the Utils class."""
"""Unit Test for the errors parsing class."""

from genai.exceptions import ApiResponseException
from httpx import Response
Expand Down
4 changes: 3 additions & 1 deletion tests/unit/utils/test_pyroscope.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
import pytest
from requests.exceptions import RequestException

from ols.utils.pyroscope import start_with_pyroscope_enabled
from ols.utils.pyroscope import (
start_with_pyroscope_enabled,
)


@pytest.fixture
Expand Down
5 changes: 4 additions & 1 deletion tests/unit/utils/test_redactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ def test_redact_question_image_ip(self):
"write a deployment yaml for the mongodb image with nodeip as 1.123.0.99"
)
redacted_question = self.query_filter.redact("test_id", query)
expected_output = "write a deployment yaml for the mongodb REDACTED_image with nodeip as REDACTED_IP" # noqa: E501
expected_output = (
"write a deployment yaml for the mongodb REDACTED_image with nodeip "
"as REDACTED_IP"
)
assert redacted_question == expected_output

def test_redact_question_mongopart_url_phone(self):
Expand Down
Loading