mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Try to add port
This commit is contained in:
parent
d02d5e4dbc
commit
ba986cb5b7
1 changed files with 4 additions and 4 deletions
|
|
@ -41,7 +41,7 @@ class TestAiohttpSession:
|
|||
|
||||
async def test_create_proxy_session(self):
|
||||
auth = aiohttp.BasicAuth("login", "password", "encoding")
|
||||
async with AiohttpSession(proxy=("socks5://proxy.url/", auth)) as session:
|
||||
async with AiohttpSession(proxy=("socks5://proxy.url:1080/", auth)) as session:
|
||||
assert session._connector_type == aiohttp_socks.ProxyConnector
|
||||
|
||||
assert isinstance(session._connector_init, dict)
|
||||
|
|
@ -51,7 +51,7 @@ class TestAiohttpSession:
|
|||
assert isinstance(aiohttp_session.connector, aiohttp_socks.ProxyConnector)
|
||||
|
||||
async def test_create_proxy_session_proxy_url(self):
|
||||
async with AiohttpSession(proxy="socks4://proxy.url/") as session:
|
||||
async with AiohttpSession(proxy="socks4://proxy.url:1080/") as session:
|
||||
assert isinstance(session.proxy, str)
|
||||
|
||||
assert isinstance(session._connector_init, dict)
|
||||
|
|
@ -62,8 +62,8 @@ class TestAiohttpSession:
|
|||
|
||||
async def test_create_proxy_session_chained_proxies(self):
|
||||
proxy_chain = [
|
||||
"socks4://proxy.url/",
|
||||
"socks5://proxy.url/",
|
||||
"socks4://proxy.url:1080/",
|
||||
"socks5://proxy.url:1080/",
|
||||
"http://user:password@127.0.0.1:3128",
|
||||
]
|
||||
async with AiohttpSession(proxy=proxy_chain) as session:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue