def postpone_tip_expiration(self): recv_desc = yield admin.receiver.get_receiver_list('en') self.assertEqual(len(recv_desc), 2) rtip_desc = yield receiver.get_receivertip_list(recv_desc[0]['id'], 'en') self.assertEqual(len(rtip_desc), 1) rtip.postpone_expiration_date(recv_desc[0]['id'], rtip_desc[0]['id']) yield cleaning_sched.CleaningSchedule().operation()
def postpone_tip_expiration(self): recv_desc = yield admin.get_receiver_list('en') self.assertEqual(len(recv_desc), 2) rtip_desc = yield receiver.get_receivertip_list(recv_desc[0]['id'], 'en') self.assertEqual(len(rtip_desc), 1) rtip.postpone_expiration_date(recv_desc[0]['id'], rtip_desc[0]['id']) yield cleaning_sched.CleaningSchedule().operation()
def postpone_tip_expiration(self): recv_desc = yield admin.get_receiver_list() self.assertEqual(len(recv_desc), 2) rtip_desc = yield receiver.get_receiver_tip_list(recv_desc[0]['id']) self.assertEqual(len(rtip_desc), 1) tip_list = yield cleaning_sched.get_tiptime_by_marker(models.InternalTip._marker[2]) self.assertEqual(len(tip_list), 1) rtip.postpone_expiration_date(recv_desc[0]['id'], rtip_desc[0]['id']) yield cleaning_sched.CleaningSchedule().operation()
def fail_postpone_expiration_date(self): tip_expiring = yield rtip.get_tip( self.receiver1_desc['id'], self.rtip1_id, 'en') yield self.assertFailure(rtip.postpone_expiration_date( self.receiver1_desc['id'], self.rtip1_id), errors.ExtendTipLifeNotEnabled) tip_not_postponeed = yield rtip.get_tip( self.receiver1_desc['id'], self.rtip1_id, 'en') self.assertEqual(tip_expiring['expiration_date'], tip_not_postponeed['expiration_date'])
def fail_postpone_expiration_date(self): tip_expiring = yield rtip.get_rtip( self.receiver1_desc['id'], self.rtip1_id, 'en') yield self.assertFailure(rtip.postpone_expiration_date( self.receiver1_desc['id'], self.rtip1_id), errors.ExtendTipLifeNotEnabled) tip_not_postponeed = yield rtip.get_rtip( self.receiver1_desc['id'], self.rtip1_id, 'en') self.assertEqual(tip_expiring['expiration_date'], tip_not_postponeed['expiration_date'])
def success_postpone_expiration_date(self): """ Tests with receiver1 and update with receiver2 is equal to use the the same receiver """ tip_expiring = yield rtip.get_tip(self.receiver1_desc['id'], self.rtip1_id, 'en') yield rtip.postpone_expiration_date(self.receiver2_desc['id'], self.rtip2_id) tip_postponeed = yield rtip.get_tip(self.receiver1_desc['id'], self.rtip1_id, 'en') self.assertNotEqual(tip_expiring['expiration_date'], tip_postponeed['expiration_date'])
def success_postpone_expiration_date(self): """ Tests with receiver1 and update with receiver2 is equal to use the the same receiver """ tip_expiring = yield rtip.get_tip( self.receiver1_desc['id'], self.rtip1_id, 'en') yield rtip.postpone_expiration_date( self.receiver2_desc['id'], self.rtip2_id) tip_postponeed = yield rtip.get_tip( self.receiver1_desc['id'], self.rtip1_id, 'en') self.assertNotEqual(tip_expiring['expiration_date'], tip_postponeed['expiration_date'])