Exemple #1
0
    def test_veneno_recurring(self, description, messageInfo):
        detailsOfFilterListCreated = CampaignShardHelper.createFilterList(
            self.campaignId, 'test_list_{}'.format(int(time.time())))
        self.listId = detailsOfFilterListCreated['groupDetails']['id']
        authorizeResult = authorize.authorizeCampaign(self, messageInfo, False)
        authorize.assertAuthorize(authorizeResult['authorizeResponse'], 200)

        self.node.append(
            [self.listId, detailsOfFilterListCreated, authorizeResult])
Exemple #2
0
 def test_authorize_sms_recurring_multiple_times(self, description, messageInfo, statusCode, errorCode, errorMessage):
     actualListIdGettingUsedInAllCases = self.listId
     actualCampaignIdGettingUsedInAllCases = self.campaignId
     try:
         self.listId = constant.config['message_recurring']['SMS']['listId']
         self.campaignId = constant.config['message_recurring']['SMS']['campaignId']
         authorizeResult = authorize.authorizeCampaign(self, messageInfo, False)
         authorizeResult = authorize.makeAuthorizeRequest(authorizeResult['campaignId'], authorizeResult['messageId'])
         authorize.assertAuthorize(authorizeResult, statusCode, errorCode, errorMessage)
     except AssertionError, reason:
         Assertion.constructAssertion(False, reason)
Exemple #3
0
 def test_authorize_sms_recurring(self, description, messageInfo):
     Logger.log('Actual ListId:{} and CampaignId:{} and used for Recurring listId:{} and campaignId:{}'.format(self.listId, self.campaignId, constant.config['message_recurring']['SMS']['listId'], constant.config['message_recurring']['SMS']['campaignId']))
     actualListIdGettingUsedInAllCases = self.listId
     actualCampaignIdGettingUsedInAllCases = self.campaignId
     actualVoucherIdGettingUsedInAllCases = self.voucherId
     try:
         self.listId = constant.config['message_recurring']['SMS']['listId']
         self.campaignId = constant.config['message_recurring']['SMS']['campaignId']
         self.voucherId = constant.config['message_recurring']['SMS']['voucherId']
         authorizeResult = authorize.authorizeCampaign(self, messageInfo, False)
         authorize.assertAuthorize(authorizeResult['authorizeResponse'], 200)
     except AssertionError, reason:
         Assertion.constructAssertion(False, reason)
Exemple #4
0
 def test_veneno_inboxUser_ProdSanity(self, description, messageInfo):
     authorizeResult = authorize.authorizeCampaign(self, messageInfo, False)
     authorize.assertAuthorize(authorizeResult['authorizeResponse'], 200)
     communicationDetailId, communicationDetailBucketId, communicationDetailExpectedCount = authorize.assertMessageQueueAndGetCommunicationDetailsForReferenceMessageQueueId(
         self.campaignId, self.groupVersionResult['TEST']['id'],
         authorizeResult['messageId'])
     VenenoDBAssertion(self.campaignId, messageInfo[0],
                       communicationDetailId,
                       self.groupVersionResult['TEST']['customer_count'],
                       self.groupVersionResult['TEST']['id'],
                       authorizeResult['payload']['message']).check()
     authorize.assertUserPresenceInNsAdminTable(
         communicationDetailId, communicationDetailBucketId,
         int(communicationDetailExpectedCount))
Exemple #5
0
 def test_authorize_sms_Coupon_immediate_Sanity(self, description, messageInfo):
     authorizeResult = authorize.authorizeCampaign(self, messageInfo, constant.messagesDefault['updated'])
     authorize.assertAuthorize(authorizeResult['authorizeResponse'], 200)
     authorize.dbAssertAuthorize(authorizeResult)
Exemple #6
0
 def test_authorize_sms_Generic_particularDate(self, description, messageInfo):
     authorizeResult = authorize.authorizeCampaign(self, messageInfo, False)
     authorize.assertAuthorize(authorizeResult['authorizeResponse'], 200)
     authorize.dbAssertAuthorize(authorizeResult)
Exemple #7
0
 def test_authorize_sms_using_revokedvoucherseries(self, description, messageInfo):
     invalidateCouponReq = LuciObject.invalidateCouponRequest({'orgId' : constant.config['orgId'], 'couponSeriesId' : int(self.voucherId)})
     Logger.log('Is Revoked Coupons : ' , self.luciObj.invalidateCoupons(invalidateCouponReq))
     authorizeResult = authorize.authorizeCampaign(self, messageInfo, False)
     authorize.assertAuthorize(authorizeResult['authorizeResponse'], 200)
     authorize.dbAssertAuthorize(authorizeResult)
Exemple #8
0
 def test_authorize_sms_multiple_times(self, description, messageInfo, statusCode, errorCode, errorMessage):
     authorizeResult = authorize.authorizeCampaign(self, messageInfo, constant.messagesDefault['updated'])
     authorizeResult = authorize.makeAuthorizeRequest(authorizeResult['campaignId'], authorizeResult['messageId'])
     authorize.assertAuthorize(authorizeResult, statusCode, errorCode, errorMessage)