fix pytests

This commit is contained in:
Shroominic
2026-01-03 22:49:46 +01:00
parent 6d780ef96d
commit 9e9bc5bff8
2 changed files with 40 additions and 28 deletions
@@ -9,6 +9,7 @@ import gc
import statistics
import time
from typing import Any, Dict, List
from unittest.mock import patch
import psutil
import pytest
@@ -105,6 +106,10 @@ class TestPerformanceBaseline:
("GET", "/v1/wallet/info", authenticated_client, None),
]
# Enable provider discovery for this test
with patch(
"routstr.core.settings.settings.providers_refresh_interval_seconds", 300
):
# Warm up
for _ in range(10):
await integration_client.get("/")
@@ -19,6 +19,13 @@ def _clear_providers_cache() -> None:
_PROVIDERS_CACHE.clear()
@pytest.fixture(autouse=True)
def _enable_provider_discovery() -> None:
"""Enable provider discovery for all tests in this module"""
with patch("routstr.core.settings.settings.providers_refresh_interval_seconds", 300):
yield
@pytest.mark.integration
@pytest.mark.asyncio
async def test_providers_endpoint_default_response(