示例#1
0
文件: tests.py 项目: zyh1234/bk-sops
 def test_template_group_by_cite(self):
     """
     各流程模板被引用为子流程次数、创建轻应用个数、创建任务个数
     :return:
     """
     self.postRequest.path = '/analysis/query_template_by_group/'
     self.postRequest.POST['group_by'] = AE.template_cite
     response = query_template_by_group(self.postRequest)
     response_dict = json.loads(response.content)
     if response_dict["data"]["total"] == 0:
         self.assertEqual(jsonschema.validate(response_dict, ANALYSIS_NO_DATA_PARAMS), None)
     else:
         self.assertEqual(jsonschema.validate(response_dict, ANALYSIS_TEMPLATE_CITE_PARAMS), None)
示例#2
0
文件: tests.py 项目: zyh1234/bk-sops
 def test_template_group_by_category(self):
     """
     流程模板分类统计数据
     :return:
     """
     self.postRequest.path = '/analysis/query_template_by_group/'
     self.postRequest.POST['group_by'] = AE.category
     response = query_template_by_group(self.postRequest)
     response_dict = json.loads(response.content)
     if response_dict["data"]["total"] == 0:
         self.assertEqual(jsonschema.validate(response_dict, ANALYSIS_NO_DATA_PARAMS), None)
     else:
         self.assertEqual(jsonschema.validate(response_dict, ANALYSIS_CATEGORY_AND_BUSINESS_PARAMS), None)