def test_irisv2_message_precheck_create_filter_mobile_recurring_CreditAvialable( self, campaignType, testControlType, listType, channel, messageInfo, precheckErrors): try: messageDetails = CreateMessage.create(campaignType, testControlType, listType, channel, messageInfo, updateNode=True, lockNode=True) precheckErrors[1]['parameters'][ 'balanceRequiredCredits'] = list_Calls().getCustomerCountInGVD( messageDetails['PAYLOAD']['targetAudience']['include'][0]) CreateMessage.assertResponse(messageDetails['RESPONSE'], 200) IrisHelper.updateCredit(0, channel) preCheckResponse = PreCheck.executePrecheck( constant.config['node'][campaignType][testControlType] ['CAMPAIGN']['ID'], messageDetails['RESPONSE']['json']['entity']['id']) PreCheck.assertPreCheckResponse(preCheckResponse, 200) PreCheck.assertPrecheckStatus(preCheckResponse, precheckErrors) except Exception, exp: Assertion.constructAssertion( False, 'Failure Due to Exception :{}'.format(exp))
def test_irisv2_message_precheck_create_upload_mobilePush_particularDate_NotAuthorized( self, campaignType, testControlType, listType, channel, messageInfo, preCheckErrorList): messageDetails = CreateMessage.create(campaignType, testControlType, listType, channel, messageInfo, updateNode=True, lockNode=True) CreateMessage.assertResponse(messageDetails['RESPONSE'], 200) preCheckResponse = PreCheck.executePrecheck( constant.config['node'][campaignType][testControlType]['CAMPAIGN'] ['ID'], messageDetails['RESPONSE']['json']['entity']['id']) PreCheck.assertPreCheckResponse(preCheckResponse, 200) PreCheck.assertPrecheckStatus(preCheckResponse, preCheckErrorList)
def test_irisv2_message_precheck_create_filter_email_Recurring_MaxUser( self, campaignType, testControlType, listType, channel, messageInfo, precheckErrors): messageDetails = CreateMessage.create(campaignType, testControlType, listType, channel, messageInfo, updateNode=True, lockNode=True, maxUser=[1]) precheckErrors[1]['parameters']['totalCustomerCount'] = list_Calls( ).getCustomerCountInGVD( messageDetails['PAYLOAD']['targetAudience']['include'][0]) CreateMessage.assertResponse(messageDetails['RESPONSE'], 200) preCheckResponse = PreCheck.executePrecheck( constant.config['node'][campaignType][testControlType]['CAMPAIGN'] ['ID'], messageDetails['RESPONSE']['json']['entity']['id']) PreCheck.assertPreCheckResponse(preCheckResponse, 200) PreCheck.assertPrecheckStatus(preCheckResponse, precheckErrors)
def test_irisv2_message_precheck_create_upload_mobile_particularDate_GatewayNotAvialable( self, campaignType, testControlType, listType, channel, messageInfo, preCheckErrorList): try: messageDetails = CreateMessage.create(campaignType, testControlType, listType, channel, messageInfo, updateNode=True, lockNode=True) CreateMessage.assertResponse(messageDetails['RESPONSE'], 200) IrisHelper.disableDomainGatewayMapId(channel) preCheckResponse = PreCheck.executePrecheck( constant.config['node'][campaignType][testControlType] ['CAMPAIGN']['ID'], messageDetails['RESPONSE']['json']['entity']['id']) PreCheck.assertPreCheckResponse(preCheckResponse, 200) PreCheck.assertPrecheckStatus(preCheckResponse, preCheckErrorList) finally: IrisHelper.createNewDummyGateway(channel)