From beeea0342c3c4fcead83eba3818e71e8d1eb8c7e Mon Sep 17 00:00:00 2001 From: Wu Clan Date: Mon, 11 Mar 2024 16:05:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=85=8D=E7=BD=AE=E5=AF=BC?= =?UTF-8?q?=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- httpfpt/utils/send_report/wechat.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/httpfpt/utils/send_report/wechat.py b/httpfpt/utils/send_report/wechat.py index 50af58a..825251e 100644 --- a/httpfpt/utils/send_report/wechat.py +++ b/httpfpt/utils/send_report/wechat.py @@ -1,8 +1,7 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- - from httpfpt.common.log import log -from httpfpt.core.get_conf import config +from httpfpt.core.get_conf import httpfpt_config class WeChat: @@ -18,8 +17,8 @@ def send(self) -> None: data = { 'msgtype': 'markdown', 'markdown': { - 'content': f"# {config.TEST_REPORT_TITLE}\n" - f"> 👤 测试人员: **{config.TESTER_NAME}**\n" + 'content': f"# {httpfpt_config.TEST_REPORT_TITLE}\n" + f"> 👤 测试人员: **{httpfpt_config.TESTER_NAME}**\n" f"> 🤖 测试结果: **{self.content['result']}**\n" f"> ✅ 通过用例: **{self.content['passed']}**\n" f"> 🔧 失败用例: **{self.content['failed']}**\n" @@ -31,10 +30,10 @@ def send(self) -> None: }, } response = requests.session().post( - url=config.WECHAT_WEBHOOK, + url=httpfpt_config.WECHAT_WEBHOOK, json=data, headers=headers, - proxies=config.WECHAT_PROXY, # type: ignore + proxies=httpfpt_config.WECHAT_PROXY, # type: ignore ) response.raise_for_status() except Exception as e: