def test_campaignShardThrfit_getAudienceGroupWithDataSourceInfo(
         self, campaignType, audienceType):
     groupId = constant.thiriftCampaignShardTestReferenceObject[
         campaignType]['campaign']['lists'][audienceType][0][
             'groupDetails']['id']
     Logger.log(
         'Making getAudienceGroupWithDataSourceInfo Thrift Call for campaignType :{} , audienceType :{} with  groupId :{}'
         .format(campaignType, audienceType, groupId))
     AudienceGroup = self.connObj.getAudienceGroupWithDataSourceInfo(
         self.campaignShardObject.AudienceGroupDataSourceInfoRequest(
             groupId))
     CampaignShardHelper.validateGetAudienceGroupWithDataSourceInfo(
         campaignType, audienceType, AudienceGroup)
예제 #2
0
    def test_campaignShardThrift_searchAudienceGroupByLabel_filterBased(
            self, campaignType, audienceType):
        listOfAudienceType = [
            self.campaignShardObject.AudienceGroupType[audienceType]
        ]
        listOfAudienceGroup = self.connObj.searchAudienceGroup(
            listOfAudienceType)

        groupLabel = constant.thiriftCampaignShardTestReferenceObject[
            campaignType]['campaign']['lists'][audienceType][0]['groupLabel']
        listOfAudienceGroup = self.connObj.searchAudienceGroupByLabel(
            groupLabel, listOfAudienceType)
        CampaignShardHelper.validateGetAudienceGroupWithDataSourceInfo(
            campaignType, audienceType, listOfAudienceGroup[0], checkS3=False)
예제 #3
0
    def test_campaignShardThrfit_getAudienceGroupWithDataSourceInfo_filter_zeroUsers(
            self, campaignType, audienceType):
        campaignId = constant.thiriftCampaignShardTestReferenceObject[
            campaignType.lower()]['campaign']['id']
        groupId = CampaignShardHelper.getGroupIdForFilterBasedListWithZeroRecords(
            campaignType, campaignId)['groupDetails']['id']

        Logger.log(
            'Making getAudienceGroupWithDataSourceInfo Thrift Call for campaignType :{} , audienceType :{} with  groupId :{}'
            .format(campaignType, audienceType, groupId))
        AudienceGroup = self.connObj.getAudienceGroupWithDataSourceInfo(
            self.campaignShardObject.AudienceGroupDataSourceInfoRequest(
                groupId))
        CampaignShardHelper.validateGetAudienceGroupWithDataSourceInfo(
            campaignType, audienceType, AudienceGroup)
예제 #4
0
 def test_campaignShardThrift_newSearchAudienceGroupByLabel(
         self, campaignType, audienceType, testPercentage):
     audienceSearchRequest = self.campaignShardObject.AudienceSearchRequest(
         searchText=constant.
         thiriftCampaignShardTestReferenceObject[campaignType]['campaign']
         ['lists'][audienceType][0]['groupLabel'],
         audienceGroupTypes=[
             self.campaignShardObject.AudienceGroupType[audienceType]
         ],
         testControl=self.campaignShardObject.TestControl(
             campaignType, testPercentage))
     listOfAudienceGroup = self.connObj.newSearchAudienceGroupByLabel(
         audienceSearchRequest)
     CampaignShardHelper.validateGetAudienceGroupWithDataSourceInfo(
         campaignType, audienceType, listOfAudienceGroup[0], checkS3=False)