Skip to content

Commit

Permalink
修复配置导入
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-clan committed Mar 11, 2024
1 parent 05d3ffd commit beeea03
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions httpfpt/utils/send_report/wechat.py
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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"> ✅ 通过用例: <font color='info'>**{self.content['passed']}**</font>\n"
f"> 🔧 失败用例: **{self.content['failed']}**\n"
Expand All @@ -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:
Expand Down

0 comments on commit beeea03

Please sign in to comment.