Ejemplo n.º 1
0
 def test_LUCI_CF_007(self, description):
     try:
         couponConfigObj, couponSeriesId = LuciHelper.saveCouponConfigAndAssertions(
             self)
         LuciHelper.getCouponConfigAndAssertion(self, couponSeriesId, 0, 0)
         getAllCouponConfig = self.connObj.getAllCouponConfigurations(
             LuciObject.getAllCouponConfigRequest(
                 {'couponSeriesIds': [couponSeriesId]}))[0].__dict__
         Assertion.constructAssertion(
             'owned_by' in getAllCouponConfig,
             'Getting Details Owned by in CouponConfig')
         Assertion.constructAssertion(
             'owner_id' in getAllCouponConfig,
             'Getting Details Owner id in CouponConfig')
     except Exception, luciExp:
         luciExp = luciExp.__dict__
         Assertion.constructAssertion(
             luciExp['errorCode'] == constant.INVALID_INPUT,
             'Luci Exception error code Actual: {} and Expected: {}'.format(
                 luciExp['errorCode'], constant.INVALID_INPUT))
         Assertion.constructAssertion(
             luciExp['errorMsg'] ==
             'owned by should be outbound when series type is campaign',
             'Luci Exception Error Msg Actual : {}'.format(
                 luciExp['errorMsg']))
Ejemplo n.º 2
0
 def test_LUCI_GCC_009_sanity(self, description, requestFilter):
     configRequest = LuciObject.getCouponConfigRequest(requestFilter)
     couponConfigList = self.connObj.getCouponConfiguration(configRequest)
     getAllResponseList = self.connObj.getAllCouponConfigurations(LuciObject.getAllCouponConfigRequest(requestFilter))
     Assertion.constructAssertion(len(couponConfigList) == len(getAllResponseList), 'GetCouponConfig & GetAllConfig List size {} and {} is matched'.format(len(couponConfigList),len(getAllResponseList)))
     for getConfigCouponSeries,getAllConfigCouponSeries in zip(couponConfigList,getAllResponseList):
         getConfigCouponSeries = getConfigCouponSeries.__dict__
         getAllConfigCouponSeries = getAllConfigCouponSeries.__dict__
         Assertion.constructAssertion(getConfigCouponSeries['id'] == getAllConfigCouponSeries['id'] , 'GetCouponConfig & GetAllConfig CouponSeriesId is Matched {} and {}'.format(getConfigCouponSeries['id'],getAllConfigCouponSeries['id']))