def test_appmaker_group_by_cc_id(self): """ 各业务中轻应用个数和占比 :return: """ self.postRequest.path = '/analysis/query_appmaker_by_group/' self.postRequest.POST['group_by'] = AE.biz_cc_id response = query_appmaker_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)
def test_appmaker_group_by_instance(self): """ 各轻应用详情和创建任务个数 :return: """ self.postRequest.path = '/analysis/query_appmaker_by_group/' self.postRequest.POST['group_by'] = AE.appmaker_instance response = query_appmaker_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_APPMAKER_INSTANCE_PARAMS), None)