本文整理汇总了Python中tconfig.TConfig.VERIFY_SERVER_CERT方法的典型用法代码示例。如果您正苦于以下问题:Python TConfig.VERIFY_SERVER_CERT方法的具体用法?Python TConfig.VERIFY_SERVER_CERT怎么用?Python TConfig.VERIFY_SERVER_CERT使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tconfig.TConfig
的用法示例。
在下文中一共展示了TConfig.VERIFY_SERVER_CERT方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_http
# 需要导入模块: from tconfig import TConfig [as 别名]
# 或者: from tconfig.TConfig import VERIFY_SERVER_CERT [as 别名]
def test_http(client):
t_config = TConfig()
t_config.DATA_DIR = os.getcwd()
t_config.VERIFY_SERVER_CERT = False
client = Client(t_config, refresh=True, test=True)
update = client.update_check(client.app_name, '0.0.1')
assert update is not None
assert update.app_name == 'jms'
assert update.download() is True
assert update.is_downloaded() is True
示例2: test_async_http
# 需要导入模块: from tconfig import TConfig [as 别名]
# 或者: from tconfig.TConfig import VERIFY_SERVER_CERT [as 别名]
def test_async_http(client):
t_config = TConfig()
t_config.DATA_DIR = os.getcwd()
t_config.VERIFY_SERVER_CERT = False
client = Client(t_config, refresh=True, test=True)
update = client.update_check(client.app_name, '0.0.1')
assert update is not None
assert update.app_name == 'jms'
update.download(async=True)
count = 0
while count < 61:
if update.is_downloaded() is True:
break
time.sleep(1)
count += 1
assert update.is_downloaded() is True
示例3: test_multiple_background_calls
# 需要导入模块: from tconfig import TConfig [as 别名]
# 或者: from tconfig.TConfig import VERIFY_SERVER_CERT [as 别名]
def test_multiple_background_calls(self, client):
t_config = TConfig()
t_config.DATA_DIR = os.getcwd()
t_config.VERIFY_SERVER_CERT = False
client = Client(t_config, refresh=True, test=True)
update = client.update_check(client.app_name, '0.0.1')
assert update is not None
assert update.app_name == 'Acme'
update.download(background=True)
count = 0
assert update.download(background=True) is None
assert update.download() is None
while count < 61:
if update.is_downloaded() is True:
break
time.sleep(1)
count += 1
assert update.is_downloaded() is True