From 4fc866620fbb59b925c7697b678df2277987754c Mon Sep 17 00:00:00 2001 From: Oliver Meyer Date: Fri, 6 Mar 2026 08:34:34 +0100 Subject: [PATCH] test: mock BucketService.find_static in GUI test --- tests/aignostics/bucket/gui_test.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/aignostics/bucket/gui_test.py b/tests/aignostics/bucket/gui_test.py index 57efbac44..3d7a141f3 100644 --- a/tests/aignostics/bucket/gui_test.py +++ b/tests/aignostics/bucket/gui_test.py @@ -5,6 +5,7 @@ import string from asyncio import sleep from pathlib import Path +from unittest.mock import patch import psutil import pytest @@ -18,8 +19,10 @@ @pytest.mark.integration async def test_gui_bucket_shows(user: User) -> None: """Test that the user sees the dataset page.""" - await user.open("/bucket") - await user.should_see("The bucket is securely hosted on Google Cloud in EU") + # Service.find_static can be slow and lead to test timeouts; we patch it to return an empty list. + with patch("aignostics.bucket._gui.Service.find_static", return_value=[]): + await user.open("/bucket") + await user.should_see("The bucket is securely hosted on Google Cloud in EU") @pytest.mark.e2e