MCPcopy Create free account
hub / github.com/NanmiCoder/MediaCrawler / test_ip_pool

Method test_ip_pool

test/test_proxy_ip_pool.py:34–40  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

32
33class TestIpPool(IsolatedAsyncioTestCase):
34 async def test_ip_pool(self):
35 pool = await create_ip_pool(ip_pool_count=1, enable_validate_ip=True)
36 print("\n")
37 for _ in range(3):
38 ip_proxy_info: IpInfoModel = await pool.get_proxy()
39 print(ip_proxy_info)
40 self.assertIsNotNone(ip_proxy_info.ip, msg="Verify if IP is obtained successfully")
41
42 async def test_ip_expiration(self):
43 """Test IP proxy expiration detection functionality"""

Callers

nothing calls this directly

Calls 2

create_ip_poolFunction · 0.90
get_proxyMethod · 0.45

Tested by

no test coverage detected