Skip to content

Commit a474768

Browse files
fix: update mock_stagehand_client fixture to set internal page properties
The page property is now read-only (returns LivePageProxy), so tests need to set the internal _original_page and _active_page properties instead
1 parent 535339d commit a474768

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/conftest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,9 @@ def mock_stagehand_client(mock_stagehand_config):
233233
# Mock the essential components
234234
client.llm = MagicMock()
235235
client.llm.completion = AsyncMock()
236-
client.page = MagicMock()
236+
# Set internal page properties instead of the read-only page property
237+
client._original_page = MagicMock()
238+
client._active_page = client._original_page
237239
client.agent = MagicMock()
238240
client._client = MagicMock()
239241
client._execute = AsyncMock()

0 commit comments

Comments
 (0)