Skip to content

Commit eb48ffd

Browse files
committed
chore: Remove property exposing internal pydantic model
1 parent 5b2cc8d commit eb48ffd

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

packages/toolbox-core/src/toolbox_core/tool.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,6 @@ def _auth_service_token_getters(self) -> Mapping[str, Callable[[], str]]:
159159
def _client_headers(self) -> Mapping[str, Union[Callable, Coroutine, str]]:
160160
return MappingProxyType(self.__client_headers)
161161

162-
@property
163-
def _pydantic_model(self) -> type[BaseModel]:
164-
return self.__pydantic_model
165-
166162
def __copy(
167163
self,
168164
session: Optional[ClientSession] = None,

packages/toolbox-core/tests/test_tool.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -578,24 +578,6 @@ def test_toolbox_tool_underscore_client_headers_property(toolbox_tool: ToolboxTo
578578
client_headers["new_header"] = "new_value"
579579

580580

581-
def test_toolbox_tool_underscore_pydantic_model_property(toolbox_tool: ToolboxTool):
582-
"""Tests the _pydantic_model property returns the correct Pydantic model."""
583-
pydantic_model = toolbox_tool._pydantic_model
584-
assert issubclass(pydantic_model, BaseModel)
585-
assert pydantic_model.__name__ == TEST_TOOL_NAME
586-
587-
# Test that the model can validate expected data
588-
valid_data = {"message": "test", "count": 10}
589-
validated_data = pydantic_model.model_validate(valid_data)
590-
assert validated_data.message == "test"
591-
assert validated_data.count == 10
592-
593-
# Test that the model raises ValidationError for invalid data
594-
invalid_data = {"message": 123, "count": "not_an_int"}
595-
with pytest.raises(ValidationError):
596-
pydantic_model.model_validate(invalid_data)
597-
598-
599581
# --- Test for the HTTP Warning ---
600582
@pytest.mark.parametrize(
601583
"trigger_condition_params",

0 commit comments

Comments
 (0)