Ejemplo n.º 1
0
 def test_irisV2_createAudience_Derived_ExistingListName(self):
     label = 'Automation_ExistingList_check_{}'.format(
         int(time.time() * 1000))
     CreateAudience.derivedList('LIVE',
                                'ORG',
                                label=label,
                                derivedListInfo={
                                    'includedGroups': ['UPLOAD', 'LOYALTY'],
                                    'excludedGroup': ['LOYALTY'],
                                    'noOfUserUpload': 5
                                })
     listDetail = CreateAudience.derivedList('LIVE',
                                             'ORG',
                                             label=label,
                                             derivedListInfo={
                                                 'includedGroups':
                                                 ['UPLOAD', 'LOYALTY'],
                                                 'excludedGroup':
                                                 ['LOYALTY'],
                                                 'noOfUserUpload':
                                                 5
                                             })
     CreateAudience.assertResponse(
         listDetail['RESPONSE'], 400, 5003,
         ['invalid request : Audience label already exits'])
Ejemplo n.º 2
0
 def test_irisV2_createAudience_Derived_IncludeList_ExcludeList_MoreThan10Lists_NegativeCases(
         self, description, derivedListInfo, popfield, statusCode,
         errorCode, errorDescription):
     list = CreateAudience.derivedList('LIVE',
                                       'ORG',
                                       updateNode=True,
                                       lockNode=True,
                                       campaignCheck=False,
                                       derivedListInfo=derivedListInfo,
                                       popFields=popfield)
     CreateAudience.assertResponse(list['RESPONSE'], statusCode, errorCode,
                                   errorDescription)
Ejemplo n.º 3
0
 def test_irisV2_createAudience_stickyList_NegativeCase_01(
         self, description, includeUsers, excludeUsers, statusCode,
         errorCode, errorMessage):
     list = CreateAudience.stickyList(
         'LIVE',
         'ORG',
         campaignCheck=False,
         stickyInfo={
             'excludeUsers': CreateAudience.getPocNewUsers() * excludeUsers,
             'includeUsers': constant.config['pocUsers'] * includeUsers
         })
     CreateAudience.assertResponse(list['RESPONSE'], statusCode, errorCode,
                                   errorMessage)
Ejemplo n.º 4
0
 def test_irisV2_createAudience_Derived_IncludeExcludeList_WithInvalidIdInExcludeGroup_NegativeCases(
         self):
     payload = copy.deepcopy(constant.payload['derivedlist'])
     payload['includedGroups'] = [self.listId_1, self.listId_2]
     payload['excludedGroups'] = [99999]
     list = CreateAudience.derivedList('LIVE',
                                       'ORG',
                                       updateNode=True,
                                       lockNode=True,
                                       campaignCheck=False,
                                       payload=payload)
     CreateAudience.assertResponse(
         list['RESPONSE'], 400, 5004,
         ['invalid audience group : audience groups not exists: [99999]'])
Ejemplo n.º 5
0
 def test_irisV2_createAudience_stickyList_NegativeCase_02(
         self, description, popFields, updatePayload, statusCode, errorCode,
         errorMessage):
     stickyData = {
         'excludeUsers': CreateAudience.getPocNewUsers(),
         'includeUsers': constant.config['pocUsers']
     }
     stickyData.update(updatePayload)
     list = CreateAudience.stickyList('LIVE',
                                      'ORG',
                                      campaignCheck=False,
                                      stickyInfo=stickyData,
                                      popFields=popFields)
     CreateAudience.assertResponse(list['RESPONSE'], statusCode, errorCode,
                                   errorMessage)
Ejemplo n.º 6
0
 def test_irisV2_createAudience_Derived_IncludeExcludeList_WithSameIdInExcludeIncludeGroup_NegativeCases(
         self):
     payload = copy.deepcopy(constant.payload['derivedlist'])
     payload['includedGroups'] = [self.listId_1, self.listId_2]
     payload['excludedGroups'] = [self.listId_1]
     list = CreateAudience.derivedList('LIVE',
                                       'ORG',
                                       updateNode=True,
                                       lockNode=True,
                                       campaignCheck=False,
                                       payload=payload)
     CreateAudience.assertResponse(list['RESPONSE'], 400, 5006, [
         'invalid request : groups added in both include and exclude : [{}]'
         .format(self.listId_1)
     ])
Ejemplo n.º 7
0
 def test_irisV2_createAudience_Derived_IncludeList_WithoutFieldInPayload_NegativeCases(
         self, description, payloadChange, statusCode, errorCode,
         errorDescription):
     payload = copy.deepcopy(constant.payload['derivedlist'])
     payload.pop('excludedGroups')
     payload['includedGroups'] = [self.listId_1, self.listId_2]
     payload.pop(payloadChange)
     list = CreateAudience.derivedList('LIVE',
                                       'ORG',
                                       updateNode=True,
                                       lockNode=True,
                                       campaignCheck=False,
                                       payload=payload)
     CreateAudience.assertResponse(list['RESPONSE'], statusCode, errorCode,
                                   errorDescription)
Ejemplo n.º 8
0
 def test_irisV2_createAudience_Derived_IncludeList_SameListIdIncludedGroups_NegativeCases(
         self):
     payload = copy.deepcopy(constant.payload['derivedlist'])
     payload.pop('excludedGroups')
     payload['includedGroups'] = [self.listId_1, self.listId_1]
     list = CreateAudience.derivedList('LIVE',
                                       'ORG',
                                       updateNode=True,
                                       lockNode=True,
                                       campaignCheck=False,
                                       payload=payload)
     CreateAudience.assertResponse(list['RESPONSE'], 400, 5006, [
         'invalid request : include groups contains duplicate',
         'invalid request : combine include and exclude groups size should be minimum 2'
     ])
Ejemplo n.º 9
0
 def test_irisV2_createAudience_stickyList_NegativeCase_03(
         self, description, updatePayload, statusCode, errorCode,
         errorMessage):
     stickyData = {
         'excludeUsers': constant.config['pocUsers'],
         'includeUsers': constant.config['pocUsers'],
         'groupId': self.listInfo[0]['gId'],
         'label': self.listInfo[0]['gLabel']
     }
     stickyData.update(updatePayload)
     list = CreateAudience.stickyList('LIVE',
                                      'ORG',
                                      campaignCheck=False,
                                      stickyInfo=stickyData)
     CreateAudience.assertResponse(list['RESPONSE'], statusCode, errorCode,
                                   errorMessage)
Ejemplo n.º 10
0
 def test_irisV2_createAudience_Derived_IncludeList_InvalidFieldIncludedGroups_NegativeCases(
         self, description, payloadChange, statusCode, errorCode,
         errorDescription):
     payload = copy.deepcopy(constant.payload['derivedlist'])
     payload['includedGroups'] = [self.listId_1, self.listId_2]
     for eachKey in payload:
         if eachKey in payloadChange:
             value = payload[eachKey]
             payload.pop(eachKey)
             payload[payloadChange[eachKey]] = value
     list = CreateAudience.derivedList('LIVE',
                                       'ORG',
                                       updateNode=True,
                                       lockNode=True,
                                       campaignCheck=False,
                                       payload=payload)
     CreateAudience.assertResponse(list['RESPONSE'], statusCode, errorCode,
                                   errorDescription)
Ejemplo n.º 11
0
 def test_irisV2_createAudience_Derived_WithLabelLengthGretaerThan50Charecters_NegativeCases(
         self):
     label = 'Automation_ExistingList_checkkkkkkkkkkkkkk_{}'.format(
         int(time.time() * 1000))
     listDetail = CreateAudience.derivedList('LIVE',
                                             'ORG',
                                             label=label * 3,
                                             derivedListInfo={
                                                 'includedGroups':
                                                 ['UPLOAD', 'LOYALTY'],
                                                 'excludedGroup':
                                                 ['LOYALTY'],
                                                 'noOfUserUpload':
                                                 5
                                             })
     CreateAudience.assertResponse(listDetail['RESPONSE'], 400, 102, [
         'Invalid request : Invalid audience name. Name exceeds 160 characters. '
     ])