osc/deploy/ProxyPool/Test/testProxyClass.py
2025-05-28 19:16:17 +08:00

34 lines
676 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# -*- coding: utf-8 -*-
"""
-------------------------------------------------
File Name testProxyClass
Description :
Author : JHao
date 2019/8/8
-------------------------------------------------
Change Activity:
2019/8/8:
-------------------------------------------------
"""
__author__ = 'JHao'
import json
from ProxyHelper import Proxy
def testProxyClass():
proxy = Proxy("127.0.0.1:8080")
print(proxy.info_dict)
proxy.source = "test"
proxy_str = json.dumps(proxy.info_dict, ensure_ascii=False)
print(proxy_str)
print(Proxy.newProxyFromJson(proxy_str).info_dict)
testProxyClass()