Skip to content

Commit e7b874b

Browse files
authored
Merge pull request #1564 from tisnik/lcore-1375-optional-types-in-integration-tests
LCORE-1375: Optional types in integration tests
2 parents ca47172 + c51d9cb commit e7b874b

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

tests/integration/conftest.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import os
44
from collections.abc import Generator
55
from pathlib import Path
6-
from typing import Any
6+
from typing import Any, Optional
77

88
import pytest
99
from fastapi import Request, Response
@@ -48,8 +48,8 @@
4848
def create_mock_llm_response( # pylint: disable=too-many-arguments,too-many-positional-arguments
4949
mocker: MockerFixture,
5050
content: str = "This is a test response about Ansible.",
51-
tool_calls: list[Any] | None = None,
52-
refusal: str | None = None,
51+
tool_calls: Optional[list[Any]] = None,
52+
refusal: Optional[str] = None,
5353
input_tokens: int = 10,
5454
output_tokens: int = 5,
5555
) -> Any:
@@ -98,7 +98,7 @@ def create_mock_llm_response( # pylint: disable=too-many-arguments,too-many-pos
9898

9999
def create_mock_vector_store_response(
100100
mocker: MockerFixture,
101-
chunks: list[dict[str, Any]] | None = None,
101+
chunks: Optional[list[dict[str, Any]]] = None,
102102
) -> Any:
103103
"""Create a mock vector store response.
104104
@@ -130,7 +130,7 @@ def create_mock_vector_store_response(
130130
def create_mock_tool_call(
131131
mocker: MockerFixture,
132132
tool_name: str = "test_tool",
133-
arguments: dict[str, Any] | None = None,
133+
arguments: Optional[dict[str, Any]] = None,
134134
call_id: str = "call-123",
135135
) -> Any:
136136
"""Create a mock tool call.

0 commit comments

Comments
 (0)