Exemplo n.º 1
0
 def setup_class(self):
     Logger.logSuiteName(str(self).split('.')[-1])
     self.listInfo = CreateAudience.uploadList('LIVE', 'ORG')
     self.listInfoFilter = CreateAudience.FilterList('LIVE', 'ORG')
     constant.config['FilterListID'] = CreateAudience.FilterList(
         'LIVE', 'ORG', campaignCheck=False)['ID']
     CreateAudience.getPocUsers()
Exemplo n.º 2
0
 def setup_class(self):
     Logger.logSuiteName(str(self).split('.')[-1])
     self.mobile1 = '918660430751'
     self.mobile2 = '918660430752'
     DarknightHelper.getMongoConnection('whitelisting', 'mobile_status')
     self.monthList = DarknightHelper.monthlyDelta()
     self.orgId = constant.config['orgId']
Exemplo n.º 3
0
 def setup_class(self):
     Logger.logSuiteName(str(self).split('.')[-1])
     self.constructObj = LuciObject()
     self.userId = constant.config['usersInfo'][0]['userId']
     self.tillId = constant.config['tillIds'][0]
     self.storeId = constant.config['storeIds'][0]
     self.billId = Utils.getTime(milliSeconds=True)
Exemplo n.º 4
0
 def setup_class(self):
     Logger.logSuiteName(str(self).split('.')[-1])
     self.actualOrgId = IrisHelper.updateOrgId(
         constant.config['reon']['orgId'])
     self.actualOrgName = IrisHelper.updateOrgName(
         constant.config['reon']['orgName'])
     CreateAudience.getPocUsers()
Exemplo n.º 5
0
 def setup_class(self):
     Logger.logSuiteName(str(self).split('.')[-1])
     self.constructObj = LuciObject()
     self.DracarysObj = DracarysObject()
     self.userId = constant.config['usersInfo'][0]['userId']
     self.tillId = constant.config['tillIds'][0]
     self.orgDefaultValue = LuciDBHelper.orgDefaultValues()
Exemplo n.º 6
0
 def setup_class(self):
     Logger.logSuiteName(str(self).split('.')[-1])
     nsPort = constant.config['nsMasterPort']
     self.nsHelper = NSAdminHelper(constant.config['orgId'], 'SMS')
     luciPort = constant.config['luciPort'].next()
     self.luciObj = LuciThrift(luciPort)
     self.constructObj = LuciObject()
     constant.config['requestId'] = 'requestId_IRIS_LUCI'
     createListresponse, createListPayload, campaignId = campaignList.createList({'customTagCount':0, 'name':'IRIS_LIST_' + str(int(time.time() * 100000))}, campaignType=['LIVE', 'ORG', 'List', 'TAGS', 0])
     campaignList.assertCreateList(createListresponse, 200)
     groupVersionDetailResult, bucketId = campaignList.assertCreateListDbCalls(createListresponse['json']['entity']['listId'], createListPayload, 'ORG')
     Logger.log('GroupVersionId : {}, bucketId : {}'.format(groupVersionDetailResult, bucketId))
     addRecipientResponse, addRecipientPayload = campaignList.addRecipient({}, campaignId, createListresponse['json']['entity']['listId'], 'mobile', 10, 0, newUser=False)
     campaignList.assertAddRecipient(addRecipientResponse, 200)
     campaignList.assertAddRecipientDbCalls(addRecipientResponse, addRecipientPayload, createListresponse, campaignId, bucketId, {'TEST':groupVersionDetailResult['TEST'], 'CONTROL':groupVersionDetailResult['CONTROL']}, 'mobile')
     self.bucketId = bucketId
     self.groupVersionResult = dbCallsList.getGroupVersionDetailsWithGroupId(createListresponse['json']['entity']['listId'])
     responseCoupon, payloadCoupon, campaignId = coupons.createCoupons(campaignId=campaignId)
     self.strategy = construct.constructStrategyIds()
     self.programeId = self.strategy['programeId']
     self.allocationStrategyId = self.strategy['allocationStrategyId']
     self.expiryStrategyId = self.strategy['expirationStrategyId']
     if 'errors' not in responseCoupon['json']:
         self.voucherId = responseCoupon['json']['entity']['voucherSeriesId']
     else:
         self.voucherId = dbCallsCoupons.getVoucherSeriesIdUsingCampaignId(campaignId)
     self.campaignId = campaignId
     self.listId = createListresponse['json']['entity']['listId']
     Logger.log('Using CampaignId : {} , listId : {} for Execution of Create Message'.format(self.campaignId, self.listId))
Exemplo n.º 7
0
 def setup_class(self):
     Logger.logSuiteName(str(self).split('.')[-1])
     VenenoHelper.configRateLimit(enable=True, channel='EMAIL')
     VenenoHelper.setupStrategy(daily=1, weekly=2, monthly=3, channel='EMAIL')
     self.testObjectForRateLimit = VenenoHelper.preRequisitesForVenenoRateLimit('email',testControl='custom')
     self.campaignId = self.testObjectForRateLimit['campaign']['id']
     VenenoHelper.updateEmailStatus(self.testObjectForRateLimit['list'])
Exemplo n.º 8
0
 def setup_class(self):
     Logger.logSuiteName(str(self).split('.')[-1])
     self.constructObj = LuciObject()
     self.DracarysObj = DracarysObject()
     self.uploadTypeList = ['USER_ID', 'MOBILE', 'EMAIL', 'EXTERNAL_ID']
     self.userId = constant.config['usersInfo'][0]['userId']
     self.userIds = list()
     self.tillId = constant.config['tillIds'][0]
Exemplo n.º 9
0
 def setup_class(self):
     Logger.logSuiteName(str(self).split('.')[-1])
     self.constructObj = LuciObject()
     self.userIds = []
     self.bulkUserIds = []
     self.DracarysObj = DracarysObject()
     for i in range(len(constant.config['usersInfo'])):
         self.userIds.append(constant.config['usersInfo'][i]['userId'])
     self.tillId = constant.config['tillIds'][0]
Exemplo n.º 10
0
 def setup_class(self):
     testControlTypeSupported = ['org', 'skip', 'custom']
     listSupported = ['filter', 'upload']
     Logger.logSuiteName(str(self).split('.')[-1])
     self.campaignShardObject = campaignShardObject()
     self.intialUsedObject = copy.deepcopy(
         constant.thiriftCampaignShardTestReferenceObject)
     CampaignShardHelper.setupCampaignsInThriftReference(
         typesOfCampaign=testControlTypeSupported)
     CampaignShardHelper.setupListInThriftReference(
         listSupported, typesOfCampaign=testControlTypeSupported)
Exemplo n.º 11
0
 def setup_class(self):
     Logger.logSuiteName(str(self).split('.')[-1])
     self.connObj = LuciHelper.getConnObj(newConnection=True)
     self.constructObj = LuciObject()
     self.userId = constant.config['usersInfo'][0]['userId']
     self.tillId = constant.config['tillIds'][0]
     self.storeId = constant.config['storeIds'][0]
     self.billId = Utils.getTime(milliSeconds=True)
     self.couponConfig1, self.couponSeriesId1 = LuciHelper.saveCouponConfigAndAssertions(self, {'client_handling_type': 'DISC_CODE_PIN', 'created' : Utils.getTime(seconds=0, milliSeconds=True) ,'valid_till_date' : Utils.getTime(days=1, milliSeconds=True), 'alphaNumeric' : False, 'randomCodeLength' : 8})
     self.couponConfig2, self.couponSeriesId2 = LuciHelper.saveCouponConfigAndAssertions(self, {'client_handling_type': 'DISC_CODE_PIN','created' : Utils.getTime(seconds=1, milliSeconds=True) ,'valid_till_date' : Utils.getTime(days=1, milliSeconds=True), 'alphaNumeric' : False, 'randomCodeLength' : 8})
     self.couponConfig3, self.couponSeriesId3 = LuciHelper.saveCouponConfigAndAssertions(self, {'client_handling_type': 'DISC_CODE_PIN','created' : Utils.getTime(seconds=2, milliSeconds=True) ,'valid_till_date' : Utils.getTime(days=1, milliSeconds=True), 'alphaNumeric' : False, 'randomCodeLength' : 8})
     self.couponConfig4, self.couponSeriesId4 = LuciHelper.saveCouponConfigAndAssertions(self, {'client_handling_type': 'DISC_CODE_PIN','created' : Utils.getTime(seconds=3, milliSeconds=True) ,'valid_till_date' : Utils.getTime(days=1, milliSeconds=True), 'alphaNumeric' : False, 'randomCodeLength' : 8})
     self.couponConfig5, self.couponSeriesId5 = LuciHelper.saveCouponConfigAndAssertions(self, {'client_handling_type': 'DISC_CODE_PIN','created' : Utils.getTime(seconds=4, milliSeconds=True) ,'valid_till_date' : Utils.getTime(days=1, milliSeconds=True), 'alphaNumeric' : False, 'randomCodeLength' : 8})
Exemplo n.º 12
0
 def setup_class(self):
     Logger.logSuiteName(str(self).split('.')[-1])
     self.actualOrgId = construct.updateOrgId(
         constant.config['wechat']['orgId'])
     self.actualOrgName = construct.updateOrgName(
         constant.config['wechat']['orgName'])
     VenenoHelper.configRateLimit(enable=True, channel='WECHAT')
     VenenoHelper.setupStrategy(daily=1,
                                weekly=2,
                                monthly=3,
                                channel='WECHAT')
     self.testObjectForRateLimit = VenenoHelper.preRequisitesForVenenoRateLimit(
         'WECHAT')
     self.campaignId = self.testObjectForRateLimit['campaign']['id']
Exemplo n.º 13
0
 def setup_class(self):
     Logger.logSuiteName(str(self).split('.')[-1])
     self.orgId = constant.config['orgId']
     self.cluster = constant.config['cluster']
     self.nsObj = NSAdminHelper.getConnObj(newConnection=True)
     self.nsadminHelper = NSAdminHelper(self.orgId, 'EMAIL')
     self.nsadminHelper.disableDomainPropertiesGatewayMap()
     self.nsadminHelper.configureGateway('HIGH', 'sendgrid_HIGH')
     self.nsadminHelper.configureGateway('BULK', 'sendgrid_BULK')
     self.DR = DeliveryReceipt()
     self.msgDict = {
         "messageClass": "EMAIL",
         "priority": 'HIGH',
         "message": "test message for DLR"
     }
Exemplo n.º 14
0
 def setup_class(self):
     Logger.logSuiteName(str(self).split('.')[-1])
     self.orgId = constant.config['orgId']
     self.programId = constant.config['programId']
Exemplo n.º 15
0
 def setup_class(self):
     Logger.logSuiteName(str(self).split('.')[-1])
     self.orgId = constant.config['orgId']
     self.cluster = constant.config['cluster']
Exemplo n.º 16
0
 def setup_class(self):
     Logger.logSuiteName(str(self).split('.')[-1])
     self.testAndControlPayload = {
         'SMS': constant.payload['testandpreview_sms'],
         'EMAIL': constant.payload['testandpreview_email']
     }
Exemplo n.º 17
0
 def setup_class(self):
     Logger.logSuiteName(str(self).split('.')[-1])
     self.orgId = constant.config['orgId']
     self.programId = constant.config['programId']
     LoyaltyHelper.addTransaction()
 def setup_class(self):
     Logger.logSuiteName(str(self).split('.')[-1])
     self.listInfo = CreateAudience.uploadList('LIVE', 'ORG')
     self.listInfoFilter = CreateAudience.FilterList('LIVE', 'ORG')
Exemplo n.º 19
0
 def setup_class(self):
     Logger.logSuiteName(str(self).split('.')[-1])
     self.details = VenenoHelper.preRequisitesForVeneno(
         testControlType='custom')
Exemplo n.º 20
0
 def setup_class(self):
     Logger.logSuiteName(str(self).split('.')[-1])
Exemplo n.º 21
0
 def setup_class(self):
     Logger.logSuiteName(str(self).split('.')[-1])
     construct.resetCampaignDefaultObject()
Exemplo n.º 22
0
 def setup_class(self):
     Logger.logSuiteName(str(self).split('.')[-1])
     CreateAudience.getPocUsers()
     constant.config['FilterListID'] = CreateAudience.FilterList(
         'LAPSED', 'ORG', campaignCheck=False)['ID']