Skip to content

Commit 2c6193b

Browse files
authored
test: mock BucketService.find_static in GUI test (#465)
1 parent 7a185d4 commit 2c6193b

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

tests/aignostics/bucket/gui_test.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import string
66
from asyncio import sleep
77
from pathlib import Path
8+
from unittest.mock import patch
89

910
import psutil
1011
import pytest
@@ -18,8 +19,10 @@
1819
@pytest.mark.integration
1920
async def test_gui_bucket_shows(user: User) -> None:
2021
"""Test that the user sees the dataset page."""
21-
await user.open("/bucket")
22-
await user.should_see("The bucket is securely hosted on Google Cloud in EU")
22+
# Service.find_static can be slow and lead to test timeouts; we patch it to return an empty list.
23+
with patch("aignostics.bucket._gui.Service.find_static", return_value=[]):
24+
await user.open("/bucket")
25+
await user.should_see("The bucket is securely hosted on Google Cloud in EU")
2326

2427

2528
@pytest.mark.e2e

0 commit comments

Comments
 (0)