示例#1
0
 def test_veneno_replyMessage_CUSTOM_allErrorTypes(self, description,
                                                   changeCouponConfig):
     Logger.log(self.Details[description])
     if description == 'COUPON_EXPIRED':
         changeCouponConfig.update(
             {'fixedExpiryDate': Utils.getTime(days=2, milliSeconds=True)})
     self.voucherId = self.Details[description]['voucherId']
     self.commDetailsId = self.Details[description][
         'communicationDetailsId']
     VenenoHelper.couponConfigChange(self, changeCouponConfig)
     time.sleep(70)
     authorize.dbAssertionInSkippedReplyTables(self.commDetailsId)
     campaignMessage.replyMessage(self)
     time.sleep(10)
     campaignReplyStats = dbCallsAuthorize.getVenenoReplyStats(
         self.Details[description]['communicationDetailsId'])
     Assertion.constructAssertion(
         len(campaignReplyStats) != 0,
         'Campaign Reply Stats update status {}'.format(
             len(campaignReplyStats)))
     authorize.assertUserPresenceInNsAdminTable(
         self.Details[description]['communicationDetailsId'],
         self.Details[description]['communicationDetailBucketId'],
         int(self.Details[description]['communicationDetailExpectedCount']),
         verify=False,
         waitForInboxMsg=True)
     communcationDetailsDict = dbCallsAuthorize.getCommunicationDetailsWithId(
         self.Details[description]['communicationDetailsId'])
     Assertion.constructAssertion(
         communcationDetailsDict['state'] == 'REPLAYED',
         'Communication Details MessageId state is Actual: {} and Expected: {}'
         .format(communcationDetailsDict['state'], 'REPLAYED'))
     Assertion.constructAssertion(
         communcationDetailsDict['expected_delivery_count'] == int(
             self.Details[description]['communicationDetailExpectedCount']),
         'Communication Details Expected Delivery count Actual: {} and Expected: {}'
         .format(
             communcationDetailsDict['expected_delivery_count'],
             int(self.Details[description]
                 ['communicationDetailExpectedCount'])))
     Assertion.constructAssertion(
         communcationDetailsDict['message_queue_id'] != 0,
         'Communication Details Message Queue Id is not 0 Actual: {}'.
         format(communcationDetailsDict['message_queue_id']))
示例#2
0
 def test_veneno_replyMessage_CUSTOM_Sanity(self, description, couponConfig,
                                            skippedReason, configChange):
     couponConfig.update({'description': description})
     self.voucherId = VenenoHelper.createCouponLuci(self, couponConfig)
     communicationDetailsId, communicationDetailBucketId, communicationDetailExpectedCount = VenenoHelper.messageAuthorize(
         self, skippedError=skippedReason, isSkippedMessage=True)
     VenenoHelper.couponConfigChange(self, configChange)
     time.sleep(2)
     self.commDetailsId = communicationDetailsId
     authorize.dbAssertionInSkippedReplyTables(communicationDetailsId)
     campaignMessage.replyMessage(self)
     time.sleep(10)
     campaignReplyStats = dbCallsAuthorize.getVenenoReplyStats(
         communicationDetailsId)
     Assertion.constructAssertion(
         len(campaignReplyStats) != 0,
         'Campaign Reply Stats update status {}'.format(
             len(campaignReplyStats)))
     authorize.assertUserPresenceInNsAdminTable(
         communicationDetailsId,
         communicationDetailBucketId,
         int(communicationDetailExpectedCount),
         verify=False,
         waitForInboxMsg=True)
     communcationDetailsDict = dbCallsAuthorize.getCommunicationDetailsWithId(
         communicationDetailsId)
     Assertion.constructAssertion(
         communcationDetailsDict['state'] == 'REPLAYED',
         'Communication Details MessageId state is Actual: {} and Expected: {}'
         .format(communcationDetailsDict['state'], 'REPLAYED'))
     Assertion.constructAssertion(
         communcationDetailsDict['expected_delivery_count'] == int(
             communicationDetailExpectedCount),
         'Communication Details Expected Delivery count Actual: {} and Expected: {}'
         .format(communcationDetailsDict['expected_delivery_count'],
                 int(communicationDetailExpectedCount)))
     Assertion.constructAssertion(
         communcationDetailsDict['message_queue_id'] != 0,
         'Communication Details Message Queue Id is not 0 Actual: {}'.
         format(communcationDetailsDict['message_queue_id']))