def setup_method(self, method): self.connObj = LuciHelper.getConnObj(newConnection=True) Logger.logMethodName(method.__name__) constant.config['uploadedFileName'] = method.__name__ self.DracraysConnObj = DracarysHelper.getConnObj(newConnection=True) constant.config['requestId'] = 'luci_auto_' + str( random.randint(11111, 99999))
def setup_class(self): Logger.logSuiteName(str(self).split('.')[-1]) self.connObj = LuciHelper.getConnObj() 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)
def getCouponSeriesId(campaignId): constant.config['campaignId'] = campaignId constant.config['adminId'] = int(constant.config['userId']) constant.config['requestId'] = 'RequestID_IRISV2_{}'.format( int(time.time())) return LuciHelper.getConnObj( newConnection=True).saveCouponConfiguration( LuciObject.saveCouponConfigRequest( LuciObject.couponConfiguration({}))).__dict__['id']
def setup_class(self): Logger.logSuiteName(str(self).split('.')[-1]) self.connObj = LuciHelper.getConnObj() 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]
def getSecondCouponSeriesId(campaignId): constant.config['campaignId'] = campaignId constant.config['adminId'] = int(constant.config['userId']) constant.config['requestId'] = 'RequestID_IRISV2_{}'.format( int(time.time())) return LuciHelper.getConnObj( newConnection=True).saveCouponConfiguration( LuciObject.saveCouponConfigRequest( LuciObject.couponConfiguration({ "description": "multiple offers testing", "info": "multiple offers testing", "discount_code": "ABC123" }))).__dict__['id']
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})
def setup_method(self, method): self.connObj = LuciHelper.getConnObj(newConnection=True) Logger.logMethodName(method.__name__) constant.config['requestId'] = 'luci_auto_ase_' + str( random.randint(11111, 99999)) self.userId = constant.config['usersInfo'][0]['userId']