def test_getMessage_negative_validationMessage_usingVarinatId( self, wrongMessageId): response = GetMessage.getMessageVariantById(self.campaignId, wrongMessageId) GetMessage.assertResponse( response, 400, 3023, 'Message with message id variant does not exists')
def test_irisv2_getMessageVariant_create_upload_mobile_immediate_plain( self, campaignType, testControlType, listType, channel, messageInfo): CreateMessage.create(campaignType, testControlType, listType, channel, messageInfo) campaignId = constant.config['node'][campaignType][testControlType][ 'CAMPAIGN']['ID'] messageId = constant.config['node'][campaignType][testControlType][ 'LIST'][listType][channel]['MESSAGE'][ messageInfo['scheduleType']['type']][messageInfo['offerType']][ 'RESPONSE']['json']['entity']['id'] for eachType in ['MESSAGE_TARGET_AUDIENCE', 'VARIANT_CREATION']: status = message_calls().waitForJobDetailsStatusToClose( messageId, eachType, maxNumberOfAttempts=20) if status: getMessageResponse = GetMessage.getMessageVariantById( campaignId, message_calls().getVariantIdByMessageId(messageId)) GetMessage.assertResponse(getMessageResponse, 200) VariantDBAssertion(campaignId, messageId, [getMessageResponse['json']['entity']]).check() else: Assertion.constructAssertion( False, 'Variant_Creation is Not Closed in Specified time')
def test_getMessage_negative_validationMessage_getVariant_withMessageId( self): response = GetMessage.getMessageVariantById( self.campaignId, self.messageDetails['RESPONSE']['json']['entity']['id']) GetMessage.assertResponse( response, 400, 3040, 'Message variant with id {} does not exists'.format( self.messageDetails['RESPONSE']['json']['entity']['id']))
def test_irisv2_getMessageVariant_create_upload_mobile_immediate_points( self, campaignType, testControlType, listType, channel, messageInfo): CreateMessage.create(campaignType, testControlType, listType, channel, messageInfo) campaignId = constant.config['node'][campaignType][testControlType][ 'CAMPAIGN']['ID'] messageId = constant.config['node'][campaignType][testControlType][ 'LIST'][listType][channel]['MESSAGE'][ messageInfo['scheduleType']['type']][messageInfo['offerType']][ 'RESPONSE']['json']['entity']['id'] getMessageResponse = GetMessage.getMessageVariantById( campaignId, message_calls().getVariantIdByMessageId(messageId)) GetMessage.assertResponse(getMessageResponse, 200) VariantDBAssertion(campaignId, messageId, [getMessageResponse['json']['entity']]).check()
def test_irisv2_getMessageVariant_create_upload_mobile_immediate_plain_additionalProperties_UsingRateLimit( self, campaignType, testControlType, listType, channel, messageInfo): messageInfo = CreateMessage.create(campaignType, testControlType, listType, channel, messageInfo, updateNode=True, lockNode=True) campaignId = constant.config['node'][campaignType][testControlType][ 'CAMPAIGN']['ID'] messageId = messageInfo['RESPONSE']['json']['entity']['id'] getMessageResponse = GetMessage.getMessageVariantById( campaignId, message_calls().getVariantIdByMessageId(messageId)) GetMessage.assertResponse(getMessageResponse, 200) VariantDBAssertion(campaignId, messageId, [getMessageResponse['json']['entity']]).check()