示例#1
0
 def test_irisV2_createAudience_stickyList_ExcludePocUsersAndNewUsers(
         self, campaignType, testControlType, listType):
     stickyId = CreateAudience.stickyList(campaignType,
                                          testControlType,
                                          campaignCheck=False,
                                          updateNode=True,
                                          lockNode=True,
                                          stickyInfo={
                                              'excludeUsers': [],
                                              'includeUsers': ':1',
                                          })
     excludeUsers = constant.config[
         'pocUsers'] + CreateAudience.getPocNewUsers(newUsers=True)
     customerCount = list_Calls().getCustomerCountInGVD(stickyId['ID']) - 1
     list = CreateAudience.stickyList(
         campaignType,
         testControlType,
         campaignCheck=False,
         stickyInfo={
             'excludeUsers': excludeUsers,
             'includeUsers': CreateAudience.getPocNewUsers(newUsers=True),
             'groupId': stickyId['ID'],
             'label': stickyId['NAME']
         })
     CreateAudience.waitForGVDToBeUpdated(list['ID'])
     CreateAudienceDBAssertion(list['ID'],
                               list,
                               listType, (customerCount + 2),
                               reachabilityCheck=True,
                               isGVUpdated=True).check()
示例#2
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)
示例#3
0
 def test_irisV2_createAudience_stickyList(self, campaignType,
                                           testControlType, listType):
     list = CreateAudience.stickyList(campaignType,
                                      testControlType,
                                      campaignCheck=False,
                                      stickyInfo={
                                          'excludeUsers': [],
                                          'includeUsers': ':1'
                                      })
     CreateAudience.waitForGVDToBeUpdated(list['ID'])
     CreateAudienceDBAssertion(list['ID'],
                               list,
                               listType,
                               1,
                               reachabilityCheck=True).check()
示例#4
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)
示例#5
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)
示例#6
0
 def getListInfo(campaignType, testControlType, listType, schemaIdentifier,
                 newUser, derivedListInfo):
     if schemaIdentifier.upper() == 'MOBILE_PUSH':
         return CreateAudience.uploadList(campaignType,
                                          testControlType,
                                          schemaIdentifier=['USER_ID'],
                                          schemaData=['USER_ID'],
                                          newUser=newUser,
                                          updateNode=True,
                                          lockNode=True,
                                          campaignCheck=False,
                                          mobilePush=True)
     if listType == 'UPLOAD':
         return CreateAudience.uploadList(
             campaignType,
             testControlType,
             schemaIdentifier=[schemaIdentifier],
             schemaData=[schemaIdentifier, 'FIRST_NAME'],
             newUser=newUser,
             campaignCheck=False)
     elif listType == 'LOYALTY':
         return CreateAudience.FilterList(
             campaignType,
             testControlType,
             schemaIdentifier=[schemaIdentifier],
             campaignCheck=False)
     elif listType == 'DERIVED':
         return CreateAudience.derivedList(
             campaignType,
             testControlType,
             schemaIdentifier=[schemaIdentifier],
             newUser=newUser,
             campaignCheck=False,
             derivedListInfo=derivedListInfo)
     elif listType == 'ORG_USERS':
         return CreateAudience.stickyList(
             campaignType,
             testControlType,
             schemaIdentifier=[schemaIdentifier],
             campaignCheck=False,
             stickyInfo=derivedListInfo)
     else:
         raise Exception(
             'ListTypeNotSupportedException:{}'.format(listType))
示例#7
0
 def test_irisV2_createAudience_stickyList_newUsersAndGroupId(
         self, campaignType, testControlType, listType):
     customerCount = list_Calls().getCustomerCountInGVD(
         self.listInfo[0]['gId'])
     list = CreateAudience.stickyList(
         campaignType,
         testControlType,
         campaignCheck=False,
         stickyInfo={
             'excludeUsers': CreateAudience.getPocNewUsers(newUsers=True),
             'includeUsers': CreateAudience.getPocNewUsers(newUsers=True),
             'groupId': self.listInfo[0]['gId'],
             'label': self.listInfo[0]['gLabel']
         })
     CreateAudience.waitForGVDToBeUpdated(list['ID'])
     CreateAudienceDBAssertion(list['ID'],
                               list,
                               listType, (customerCount + 2),
                               reachabilityCheck=True,
                               isGVUpdated=True).check()