def test_LUCI_IC_DC_012(self, description):
        couponConfigObj, couponSeriesId = LuciHelper.saveCouponConfigAndAssertions(
            self)
        LuciHelper.queuePumpWait(self, couponSeriesId)
        createdCouponCount = LuciDBHelper.getCouponsCreated_Count(
            couponSeriesId, 1)
        Assertion.constructAssertion(createdCouponCount != 0,
                                     'Coupon codes are created for DC')
        Assertion.constructAssertion(
            self.connObj.getQueueSize(constant.config['orgId'], couponSeriesId,
                                      constant.config['requestId']) != 0,
            'Coupon codes pumped to queue')

        # upload the coupon code
        LuciHelper.uploadCouponAndAssertions(
            self,
            couponSeriesId,
            self.constructObj.importType['USER_ID'],
            issuedTo=self.userId,
            dracraysUpload={'userOnly': True})

        couponCode = LuciHelper.issueCouponAndAssertions(
            self,
            couponSeriesId,
            issueCouponParamObj={'storeUnitId': constant.config['adminId']})[0]
        Assertion.constructAssertion(not LuciHelper.isNumeric(couponCode),
                                     'Upload & issued Alpha-Numeric coupon')

        self.userId = constant.config['usersInfo'][1]['userId']
        couponCode2 = LuciHelper.issueCouponAndAssertions(
            self,
            couponSeriesId,
            issueCouponParamObj={'storeUnitId': constant.config['adminId']})[0]
        Assertion.constructAssertion(
            len(str(couponCode2)) == int(
                self.orgDefaultValue['random_code_length']),
            'Coupon Org Config Length is: {} Actual Coupon Lenght : {}'.format(
                len(str(couponCode2)),
                self.orgDefaultValue['random_code_length']))
        if not self.orgDefaultValue['is_alpha_numeric']:
            Assertion.constructAssertion(
                LuciHelper.isNumeric(couponCode2),
                'Org Config is Numeric Generated Coupon: {}'.format(
                    couponCode2))
        elif self.orgDefaultValue['is_alpha_numeric']:
            Assertion.constructAssertion(
                not LuciHelper.isNumeric(couponCode2),
                'Org Config is AlphaNumeric Generated Coupon: {}'.format(
                    couponCode2))
        self.userId = constant.config['usersInfo'][0]['userId']
    def test_LUCI_IC_DC_014(self, description):
        couponConfigObj, couponSeriesId = LuciHelper.saveCouponConfigAndAssertions(
            self, {
                'do_not_resend_existing_voucher': True,
                'allow_multiple_vouchers_per_user': True,
                'max_vouchers_per_user': 3
            })
        LuciHelper.queuePumpWait(self, couponSeriesId)
        createdCouponCount = LuciDBHelper.getCouponsCreated_Count(
            couponSeriesId, 1)
        Assertion.constructAssertion(createdCouponCount != 0,
                                     'Coupon codes are created for DC')
        Assertion.constructAssertion(
            self.connObj.getQueueSize(constant.config['orgId'], couponSeriesId,
                                      constant.config['requestId']) != 0,
            'Coupon codes pumped to queue')

        # upload the coupon code
        LuciHelper.uploadCouponAndAssertions(
            self,
            couponSeriesId,
            self.constructObj.importType['USER_ID'],
            issuedTo=self.userId,
            dracraysUpload={'userOnly': True})

        couponCode1 = LuciHelper.issueCouponAndAssertions(
            self,
            couponSeriesId,
            issueCouponParamObj={'storeUnitId': constant.config['adminId']})[0]
        couponCode2 = LuciHelper.issueCouponAndAssertions(
            self,
            couponSeriesId,
            issueCouponParamObj={'storeUnitId': constant.config['adminId']})[0]

        Assertion.constructAssertion(
            len(str(couponCode2)) == int(
                self.orgDefaultValue['random_code_length']),
            'Coupon Org Config Length is: {} Actual Coupon Lenght : {}'.format(
                len(str(couponCode2)),
                int(self.orgDefaultValue['random_code_length'])))
        if not self.orgDefaultValue['is_alpha_numeric']:
            Assertion.constructAssertion(
                LuciHelper.isNumeric(couponCode2),
                'Org Config is Numeric Generated Coupon: {}'.format(
                    couponCode2))
        elif self.orgDefaultValue['is_alpha_numeric']:
            Assertion.constructAssertion(
                not LuciHelper.isNumeric(couponCode2),
                'Org Config is AlphaNumeric Generated Coupon: {}'.format(
                    couponCode2))
        luciExp = LuciHelper.issueCouponAndAssertions(self,
                                                      couponSeriesId,
                                                      expectException=True)
        Assertion.constructAssertion(
            luciExp['errorCode'] ==
            constant.MAX_COUPON_ISSUAL_PER_USER_EXCEEDED,
            'Luci Exception error code Actual: {} and Expected: {}'.format(
                luciExp['errorCode'],
                constant.MAX_COUPON_ISSUAL_PER_USER_EXCEEDED))
        Assertion.constructAssertion(
            luciExp['errorMsg'] == 'max coupon per user exceeded',
            'Luci Exception Error Msg Actual : {}'.format(luciExp['errorMsg']))