Ejemplo n.º 1
0
    def tearDownClass(cls):
        #删除角色及权限
        uri = "/sysManage/role/del"
        body = {"ids": global_vars["roleId"]}
        res = Post_Get.post(uri, body)

        uri = "/sysManage/privilege/del"
        body = {"ids": global_vars["priId"]}
        res = Post_Get.post(uri, body)
Ejemplo n.º 2
0
 def test_01_qry(self):
     uri = "/sysManage/log/qry?module=&name=&pageNo=&description={0}&pageSize=&status=&time{1}=&type=&userName="******"权限删除", global_vars["start_time"])
     res = Post_Get.get(uri)
     dict = json.loads(res.content)
     records = dict["data"]["records"][0]
     self.assertIsNotNone(records)
Ejemplo n.º 3
0
 def tearDownClass(cls):
     #删除创建的相机、人像库
     uri = "/camera/delete"
     body = {"ids": global_vars["cameraId"]}
     res = Post_Get.post(uri, body)
     uri_del = "{0}/faceGroup/delete".format(dirConfig.host)
     res1 = requests.post(uri_del, global_vars["regId"])
Ejemplo n.º 4
0
 def tearDownClass(cls):
     #删除创建的用户组
     uri = "/sysManage/group/del"
     body = {"ids":global_vars["groupId"]}
     res = Post_Get.post(uri,body)
     #删除角色
     uri = "/sysManage/role/del"
     body = {"ids":global_vars["id"]}
     res = Post_Get.post(uri,body)
     #删除创建的权限
     uri_del = "/sysManage/privilege/del"
     body_del = {"ids": global_vars["priId"],
                 "userId": ""}
     res1 = Post_Get.post(uri_del,body_del)
     #删除创建的部门
     uri_del = "/sysManage/department/del"
     body_del = {"ids": global_vars["dptId"],
                 "userId": ""}
     res = Post_Get.post(uri_del,body_del)
     #删除创建的组织
     uri_del = "/sysManage/organization/del"
     body_del = {"ids": global_vars["orgId"],
                 "userId": ""}
     res = Post_Get.post(uri_del,body_del)
     #删除创建的相机
     uri = "/camera/delete"
     body = {"ids":global_vars["cameraId"]}
     res = Post_Get.post(uri,body)
     #删除创建的人像库
     uri_del = "http://192.168.1.115:8088/faceGroup/delete"
     res1 = requests.post(uri_del,global_vars["regId"])
Ejemplo n.º 5
0
 def setUpClass(cls):
     start_time = datetime.datetime.now()
     #创建权限增加日志
     name = random.randint(100, 1000)
     priData = MyFunction.create_privilege(name)
     global_vars["priId"] = priData["priId"]
     #删除创建的权限
     uri_del = "/sysManage/privilege/del"
     body_del = {"ids": global_vars["priId"], "userId": ""}
     res1 = Post_Get.post(uri_del, body_del)
     end_time = datetime.datetime.now()
     #print(end_time)
     global_vars["start_time"] = start_time
     global_vars["end_time"] = end_time
Ejemplo n.º 6
0
 def test_04_update(self):
     #uri、body参数
     uri = '/face/update'
     body = {
         "id": global_vars["addPersionToLib"],
         "age": "20",
         "name": global_vars["name"],
         "regId": global_vars["regId01"],
         "sex": "1"
     }
     #编辑权限请求及结果断言
     res = Post_Get.post(uri, body)
     dict = json.loads(res.content)
     code = dict["result"]["retCode"]
     self.assertEqual(code, "00")
Ejemplo n.º 7
0
 def test_02_exportData(self):
     uri = "/sysManage/log/qry?logType=&module=&name=&pageNo=1&pageSize=10&status=&time=&type=&userName="******"data"]["records"][0]
     self.assertIsNotNone(records)