def __init__(self): global on_off, logger, resultPath, resultPath self.caseList = [] self.caselistFile = os.path.join(readConfig.proDir, "caselist.txt") self.case_file = os.path.join(readConfig.project_path, "testCase") self.resultPath = os.path.join(readConfig.project_path, "test_report") self.email = MyEmail.get_email() log = MyLog.get_log() logger = log.getlog() resultPath = log.get_report_path() on_off = localReadConfig.get_email("on_off")
def __init__(self): global host, user, password, port, sender, title, content host = localReadConfig.get_email("mail_host") user = localReadConfig.get_email("mail_user") password = localReadConfig.get_email("mail_pass") port = localReadConfig.get_email("mail_port") sender = localReadConfig.get_email("sender") title = localReadConfig.get_email("subject") self.value = localReadConfig.get_email("receiver") self.receiver = [] # get receiver list for n in str(self.value).split("/"): self.receiver.append(n) # defined email subject date = datetime.now().strftime("%Y-%m-%d %H:%M:%S") self.subject = title + " " + date # self.log = Logger(logger='') # self.logger = self.log.getlog() self.log = MyLog.get_log() self.logger = self.log.getlog() self.msg = MIMEMultipart('mixed')
import time import unittest from framework.logger import MyLog from framework.app_engine import OpenApp from framework.base_page import BasePage from pageobjects.zhuanlan_page import zl from pageobjects.zhuanlan_author_page import zl_author from framework.android_login_page import android_login log = MyLog.get_log() logger = log.getlog() class zhuanlan_login(unittest.TestCase): @classmethod def setUp(cls): app = OpenApp(cls) cls.driver = app.open_app() @classmethod def tearDown(cls): cls().driver.quit() def test_login_dingyue(self): '''专栏订阅测试用例''' # 进入专栏详情页 zl.zl_details() # 点击订阅按钮 zl.dingyue() # 未登录去登录 android_login.login_text('17512064966', '995217') #订阅
def __init__(self): self.log = MyLog.get_log() self.logger = self.log.getlog() self.msg = MIMEMultipart('mixed')