From 32b184e005518c04b9a73da21e7ab25d8885a1ec Mon Sep 17 00:00:00 2001 From: Leonid Vinogradov Date: Mon, 17 Jun 2024 16:29:45 +0300 Subject: [PATCH] HH-219477 up balance-client --- poetry.lock | 16 ++++++++-------- pyproject.toml | 2 +- tests/test_balancer.py | 5 ++--- tests/test_sentry_integration.py | 5 +++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/poetry.lock b/poetry.lock index 2d5550401..00abaa333 100644 --- a/poetry.lock +++ b/poetry.lock @@ -596,7 +596,7 @@ files = [ [[package]] name = "http-client" -version = "2.1.12" +version = "2.1.13" description = "Balancing http client around aiohttp" optional = false python-versions = "~=3.9" @@ -604,7 +604,7 @@ files = [] develop = false [package.dependencies] -aiohttp = "3.8.3" +aiohttp = ">=3.8.3, <4.0.0" lxml = "4.9.2" orjson = "*" yarl = "1.9.2" @@ -612,8 +612,8 @@ yarl = "1.9.2" [package.source] type = "git" url = "https://github.com/hhru/balancing-http-client.git" -reference = "2.1.12" -resolved_reference = "6d54b1eb010b87b3aba4796f14c9995b40f214c9" +reference = "2.1.13" +resolved_reference = "9f503bf815262df536ebe63bf60396045e6d6271" [[package]] name = "idna" @@ -1764,13 +1764,13 @@ files = [ [[package]] name = "urllib3" -version = "2.2.1" +version = "2.2.2" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.8" files = [ - {file = "urllib3-2.2.1-py3-none-any.whl", hash = "sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d"}, - {file = "urllib3-2.2.1.tar.gz", hash = "sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19"}, + {file = "urllib3-2.2.2-py3-none-any.whl", hash = "sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472"}, + {file = "urllib3-2.2.2.tar.gz", hash = "sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168"}, ] [package.extras] @@ -2006,4 +2006,4 @@ testing = ["aioresponses", "tornado-httpclient-mock"] [metadata] lock-version = "2.0" python-versions = "~=3.9" -content-hash = "46b3647c3b4830d37b5bbe739065672c76c5810b73132b4f7de5606ae1dd1f07" +content-hash = "20a463510ece2dcca3a46f3ff16a08e8b41035ad75ecb22571bab9ccedeeb5a1" diff --git a/pyproject.toml b/pyproject.toml index 6a9225409..5413ee2b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ lxml = '4.9.2' pydantic = '^2.3.0' tornado = '6.3.2' orjson = '*' -http-client = {git = 'https://github.com/hhru/balancing-http-client.git', tag = '2.1.12'} +http-client = {git = 'https://github.com/hhru/balancing-http-client.git', tag = '2.1.13'} python-consul2-hh = {git = 'https://github.com/hhru/python-consul2', tag = 'v0.2.10'} opentelemetry-sdk = '1.17.0' opentelemetry-api = '1.17.0' diff --git a/tests/test_balancer.py b/tests/test_balancer.py index ffafe2084..add537138 100644 --- a/tests/test_balancer.py +++ b/tests/test_balancer.py @@ -4,11 +4,10 @@ class TestHttpError: free_port = None - @classmethod - def setup_class(cls) -> None: + def setup_method(self) -> None: frontik_balancer_app.start() frontik_broken_balancer_app.start() - cls.free_port = find_free_port(from_port=10000, to_port=20000) + self.free_port = find_free_port(from_port=10000, to_port=20000) def make_url(self, url: str) -> str: return ( diff --git a/tests/test_sentry_integration.py b/tests/test_sentry_integration.py index b3d8c68a1..410d2bda9 100644 --- a/tests/test_sentry_integration.py +++ b/tests/test_sentry_integration.py @@ -44,10 +44,11 @@ async def put_page(): class TestSentryIntegration(FrontikTestBase): @pytest.fixture(scope='class') - def frontik_app(self) -> FrontikApplication: + def frontik_app(self) -> Any: frontik_test_app.start() options.sentry_dsn = f'http://secret@127.0.0.1:{frontik_test_app.port}/2' - return FrontikApplication() + yield FrontikApplication() + options.sentry_dsn = None async def test_sentry_exception(self): frontik_test_app.get_page('api/2/envelope/', method=requests.delete)