Commit 66f77d0e authored by liyuanhong's avatar liyuanhong

修改了邮件标题不对的bug

parent 8abcc841
......@@ -23,10 +23,6 @@ def txtRun():
###########################################################
def runService():
caseObj = MainCase()
ts = time.time()
timeArray = time.localtime(ts)
curTime = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)
caseObj.set_title(curTime + " 拨测报告") # 设置邮件标题
caseObj.set_from_addr("optest@vandyo.com") # 设置发件箱
caseObj.set_password("123qweQWE!@#AaA") # 设置邮箱登录密码
caseObj.add_to_addr("liyuanhong@vandyo.com") # 添加收件箱
......
......@@ -195,10 +195,11 @@ class MainCase():
def sendEmail(self):
email_obj = EmailTool()
email_obj.addContent(self.msg) # 设置邮件内容
email_obj.set_title(self.title) # 设置邮件标题
ts = time.time()
timeArray = time.localtime(ts)
curTime = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)
email_obj.set_title(curTime + " 拨测报告") # 设置邮件标题
curDate = time.strftime("%Y-%m-%d", timeArray)
time.sleep(2)
email_obj.set_attachment("result/" + curDate + "/" + self.testReport,self.testReport) # 设置附件
......
......@@ -41,7 +41,7 @@ def getSignature(data,postData={}):
if __name__ == "__main__":
print(getSignature({"a":123,"b":"abc"}))
print(getSignature({"sid": "6d7b97627f4e4b8196a2e49731978b65", "ts": 1590397597, "uid": "bb4d91ccc1f6461daec7a0daf1c8e8f2"}))
# print(getSignature({"a":123,"b":"abc"}))
print(getSignature({'ts': 1590406665, 'sid': '31e07c4a44ac439dac8931aea3704c62', 'start': 1590406665, 'uid': 'bb4d91ccc1f6461daec7a0daf1c8e8f2', 'cid': '49a92ac0f9b14ba59d91ee8debe8357d'}))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment