def test_01_reportsource(self):
     '''源数据统计结果'''
     global reportsourceList
     data = {
         "endTime": self.beforetime,
         "projectId": self.projectId,
         "signName": self.signName,
         "startTime": self.nowtime
     }
     url_part = self.dmp + "/reportsource" + utils.parse_url(data)
     reportsourceList = utils().getRequest(url_part, Token=self.Token)
 def test_05_exportPerson(self):
     '''导出人群包'''
     # for i in range(1, 30):
     url_part = "/dmp/personprofile/userBag"
     data = {
         "code": 'jeFQ',
         "projectCode": self.projectCode,
         "projectId": self.projectId
     }
     # data = {"code":personprofile[0]['code'], "projectCode":self.projectCode,"projectId":self.projectId}
     url_part = url_part + utils.parse_url(data)
     utils().getRequestForExport(url_part, Token=self.Token)
 def test_0103_exportExcel(self):
     '''
     人群包导出 签名+简单分析
     '''
     part = self.dmp + "/metaevent/userBag"
     data = {
         "projectCode": "test_tjj",
         "projectId": 1,
         "signName": "YY语音",
         "simpleAnalysis": "true",
         "startTime": "2019-08-08 00:00:00",
         "endTime": "2019-08-11 00:00:00",
         "metaEventCode": "",
         "statisticalCaliber": ""
     }
     url_part = part + utils.parse_url(data)
     print("签名+简单分析")
     utils().getRequestForExport(url_part, data=data, Token=self.Token)
 def test_0102_exportExcel(self):
     '''
     人群包导出 事件+口径
     '''
     statisticalCaliberList = [
         "total_amount", "user_amount", "average_amount"
     ]
     part = self.dmp + "/metaevent/userBag"
     for statisticalCaliber in statisticalCaliberList:
         data = {
             "projectCode": "test_tjj",
             "projectId": 1,
             "signName": "",
             "simpleAnalysis": "false",
             "startTime": "2019-08-08 00:00:00",
             "endTime": "2019-08-11 00:00:00",
             "metaEventCode": "tixian2",
             "statisticalCaliber": statisticalCaliber
         }
         url_part = part + utils.parse_url(data)
         print("事件+口径" + statisticalCaliber)
         utils().getRequestForExport(url_part, data=data, Token=self.Token)