예제 #1
0
 def test02_mis_search_article(self):
     r = self.mis.mis_search_article()
     try:
         Tools.common_assert(r, statues_code=200)
     except Exception as e:
         log.error(e)
         raise
예제 #2
0
 def test03_mis_audit_article(self):
     r = self.mis.mis_article_audit()
     #print(r.json())
     try:
         Tools.common_assert(r)
     except Exception as e:
         log.error(e)
         raise
예제 #3
0
 def test01_mis_login(self, account, pwd):
     r = self.mis.mis_login(account, pwd)
     Tools.common_token(r)
     try:
         Tools.common_assert(r)
     except Exception as e:
         log.error(e)
         raise
예제 #4
0
 def test01_mp_login(self, mobile, code):
     r = self.mp.api_mp_login(mobile, code)
     print("登录接口返回的信息为:", r.json())
     try:
         Tools.common_token(r)
         Tools.common_assert(response=r)
     except Exception as e:
         # 写日志
         log.error(e)
         # 抛异常
         raise
예제 #5
0
 def test02_article(self,
                    title=api.title,
                    content=api.content,
                    channel_id=api.channel_id):
     r = self.mp.api_mp_article(title, content, channel_id)
     print("获取的响应信息为:", r.json())
     # 获取文章id
     api.article_id = r.json().get("data").get("id")
     # 断言
     try:
         Tools.common_assert(response=r)
     except Exception as e:
         log.error(e)
         raise