Skip to content

Commit 86005ca

Browse files
fix smoke test warnings
1 parent 3636016 commit 86005ca

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pytest.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ asyncio_mode = auto
88
markers =
99
unit: marks tests as unit tests
1010
integration: marks tests as integration tests
11+
smoke: marks tests as smoke tests
1112

1213
log_cli = true
1314
log_cli_level = INFO

tests/unit/core/test_page.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ def test_page_attribute_forwarding(self, mock_playwright_page):
4040
mock_client.env = "LOCAL"
4141
mock_client.logger = MagicMock()
4242

43-
# Ensure keyboard.press returns a regular value, not a coroutine
44-
mock_playwright_page.keyboard.press.return_value = None
43+
# Ensure keyboard is a regular MagicMock, not AsyncMock
44+
mock_playwright_page.keyboard = MagicMock()
45+
mock_playwright_page.keyboard.press = MagicMock(return_value=None)
4546

4647
page = StagehandPage(mock_playwright_page, mock_client)
4748

0 commit comments

Comments
 (0)