def test_lift_weight_is_valid_and_status_down_and_not_beep(self): # floor_max = 100, current_floor = 1 lift = Lift(current_floor=1,floor_max=100) # call lift at floor 10 lift.callAt(10) # select floor = 1,weight = 100 lift.start(1,weight=100) self.assertEqual('DOWN', lift.getStatus()) self.assertEqual(False, lift.getBeep())
def test_lift_weight_isnot_valid_and_status_stop_and_beep(self): # floor_max = 100, current_floor = 1 lift = Lift(current_floor=1,floor_max=100) # call lift at floor 1 lift.callAt(1) # select floor = 10,weight = 100 lift.start(10,weight=1001) self.assertEqual('STOP', lift.getStatus()) self.assertEqual(True, lift.getBeep())