Beispiel #1
0
 def test_irisV2_editCampaign_Sanity(self, description, campaignType,
                                     testControlType, editInfo):
     campaignInfo = CreateCampaign.create(campaignType,
                                          testControlType,
                                          updateNode=True)
     editInfo = CreateCampaign.edit(campaignInfo, editInfo)
     CreateCampaign.assertResponse(editInfo['RESPONSE'], 200)
     CampaignCheckDBAssertion(campaignInfo['ID'],
                              editInfo['PAYLOAD']).check()
Beispiel #2
0
 def test_irisV2_editCampaign_name(self, description, campaignType,
                                   testControlType, editInfo):
     campaignInfo = CreateCampaign.create(campaignType,
                                          testControlType,
                                          updateNode=True)
     editInfo = CreateCampaign.edit(campaignInfo, editInfo)
     CreateCampaign.assertResponse(
         editInfo['RESPONSE'],
         400,
         expectedErrorCode=1003,
         expectedErrorMessage=
         "Campaign Name Exception : Changing campaign name is not allowed.")
Beispiel #3
0
    def test_irisV2_editCampaign_AftereCreatingMessage(self, description,
                                                       campaignType,
                                                       testControlType,
                                                       channel, messageInfo,
                                                       editInfo):

        campaignInfo = CreateCampaign.create(campaignType,
                                             testControlType,
                                             updateNode=True)
        messageDetails = CreateMessage.create(campaignType,
                                              testControlType,
                                              'LOYALTY',
                                              channel,
                                              messageInfo,
                                              campaignId=campaignInfo['ID'],
                                              updateNode=True)
        campaignInfo = constant.config['node'][campaignType][testControlType][
            'CAMPAIGN']
        CreateMessage.assertResponse(messageDetails['RESPONSE'], 200)
        editInfo = CreateCampaign.edit(campaignInfo, editInfo)
        CreateCampaign.assertResponse(editInfo['RESPONSE'], 200)
        CampaignCheckDBAssertion(campaignInfo['ID'],
                                 editInfo['PAYLOAD']).check()
Beispiel #4
0
    def test_irisV2_editCampaign_Name_AftereCreatingMessage(
            self, description, campaignType, testControlType, channel,
            messageInfo, editInfo):

        campaignInfo = CreateCampaign.create(campaignType,
                                             testControlType,
                                             updateNode=True)
        messageDetails = CreateMessage.create(campaignType,
                                              testControlType,
                                              'LOYALTY',
                                              channel,
                                              messageInfo,
                                              campaignId=campaignInfo['ID'],
                                              updateNode=True)
        campaignInfo = constant.config['node'][campaignType][testControlType][
            'CAMPAIGN']
        CreateMessage.assertResponse(messageDetails['RESPONSE'], 200)
        editInfo = CreateCampaign.edit(campaignInfo, editInfo)
        CreateCampaign.assertResponse(
            editInfo['RESPONSE'],
            400,
            expectedErrorCode=1003,
            expectedErrorMessage=
            "Campaign Name Exception : Changing campaign name is not allowed.")