Browse Source

拨打电话

jialuyao 4 months ago
parent
commit
57325ca47c
2 changed files with 26 additions and 2 deletions
  1. 16 0
      cases/pc/登录功能/电销/call.py
  2. 10 2
      lib/webapi.py

+ 16 - 0
cases/pc/登录功能/电销/call.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.webapi import apimgr
+
+class c1:
+    name = '拨打电话'
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res=apimgr.call()
+        r = res.json()
+        INFO(r)
+        actural=r['error_code']
+        # INFO(length)
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查拨打电话接口是否正常',  actural == 1 )

+ 10 - 2
lib/webapi.py

@@ -1,7 +1,7 @@
 import json
 import json
 import requests
 import requests
 from hytest.common import *
 from hytest.common import *
-from pandas.io.formats.style import properties_args
+#from pandas.io.formats.style import properties_args
 from sympy.physics.vector.printing import params
 from sympy.physics.vector.printing import params
 
 
 from cfg import cfg
 from cfg import cfg
@@ -1551,7 +1551,6 @@ class APIMgr():
         response = self.s.get(f"{cfg.target_host_wx}/front/rewardText", headers=headers)
         response = self.s.get(f"{cfg.target_host_wx}/front/rewardText", headers=headers)
         return response
         return response
 
 
-
         # 添加使用人员
         # 添加使用人员
     def addUsePerson(self):
     def addUsePerson(self):
         headers = GSTORE['headers']
         headers = GSTORE['headers']
@@ -1883,6 +1882,15 @@ class APIMgr():
         response = self.s.post(f"{cfg.target_host}/jyapi/jybx/core/polymerizeSearch",headers = headers ,json = json)
         response = self.s.post(f"{cfg.target_host}/jyapi/jybx/core/polymerizeSearch",headers = headers ,json = json)
         return response
         return response
 
 
+    """拨打电话"""
+    def call(self):
+        headers = GSTORE['headers']
+        json = {
+            "phone": "19989900000"
+        }
+        response = self.s.post(f"{cfg.target_host}/jyapi/biService/call", headers=headers, json=json)
+        return response
+
 apimgr = APIMgr()
 apimgr = APIMgr()