From 3efc40e6245e07ee3fe5430c65fc7dd14fbd7a19 Mon Sep 17 00:00:00 2001 From: nu-denis Date: Fri, 26 Jan 2024 19:39:18 +0300 Subject: [PATCH] HH-205210 add passthrow_hosts for FrontikTestBase --- frontik/testing.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontik/testing.py b/frontik/testing.py index fad4a6438..1dacdd4b1 100644 --- a/frontik/testing.py +++ b/frontik/testing.py @@ -150,11 +150,15 @@ def _setup_client_server( self.http_client = app_client @pytest.fixture(autouse=True) - def setup_mock_client(self): - with aioresponses(passthrough=['http://127.0.0.1']) as mock_client: + def setup_mock_client(self, passthrow_hosts): + with aioresponses(passthrough=passthrow_hosts) as mock_client: self.mock_client = mock_client yield self.mock_client + @pytest.fixture() + def passthrow_hosts(self): + return ['http://127.0.0.1', 'http://localhost'] + async def fetch( self, path: str,