def test_socialThrift_createCustomList_withSameIdMultipleTimes( self, numberOfUsers, identifier, listName, description, channel, testControlType): groupVersionid, groupName = SocialHelper.createListForSocial( self.campaigns, testControlType) messageId = SocialHelper.createMessageForThriftHelp( self.campaigns[testControlType], groupVersionid, numberOfUsers, groupName) listName = listName.format(identifier, testControlType, int(time.time() * 1000)) preCreatedListId = None for _ in range(2): CreateCustomAudienceListResponse = self.connObj.createCustomList( SocialHelper.createUserListObject(numberOfUsers, identifier), SocialObject.CustomAudienceListDetails(listName, description, messageId), SocialObject.SocialAccountDetails(channel), constant.config['orgId'], str(groupVersionid), 'requestId_automationthriftCall_{}'.format( int(time.time() * 1000))) SocialHelper.assertCreateCustomList( groupVersionid, messageId, CreateCustomAudienceListResponse, listName, description) if preCreatedListId is None: preCreatedListId = CreateCustomAudienceListResponse.listid else: SocialHelper.assertRemoteListIds( preCreatedListId, CreateCustomAudienceListResponse.listid)
def test_socialThrift_createCustomList_WithDifferentTestControlType( self, numberOfUsers, identifier, listName, description, channel, testControlType): groupVersionid, groupName = SocialHelper.createListForSocial( self.campaigns, testControlType) messageId = SocialHelper.createMessageForThriftHelp( self.campaigns[testControlType], groupVersionid, numberOfUsers, groupName) listName = listName.format(identifier, testControlType, int(time.time() * 1000)) CreateCustomAudienceListResponse = self.connObj.createCustomList( SocialHelper.createUserListObject(numberOfUsers, identifier), SocialObject.CustomAudienceListDetails(listName, description, messageId), SocialObject.SocialAccountDetails(channel), constant.config['orgId'], str(groupVersionid), 'requestId_automationthriftCall_{}'.format( int(time.time() * 1000))) Logger.log('Create Audience List , Response Message :{}'.format( CreateCustomAudienceListResponse.message)) SocialHelper.assertCreateCustomList(groupVersionid, messageId, CreateCustomAudienceListResponse, listName, description)