def test_is_busy(self): price = 4000 making_time = 60 var_truck = FoodTruck(price, making_time) var_truck.current_order = Order(10) var_truck.time_remaining = 10 self.assertEqual(True, var_truck.is_busy()) var_truck.current_order = None var_truck.time_remaining = 0 self.assertEqual(False, var_truck.is_busy())
def test_tick(self): price = 5000 making_time = 60 var_truck = FoodTruck(price, making_time) var_truck.current_order = Order(10) var_truck.time_remaining = 10 for index in range(9, -1, -1): var_truck.tick() self.assertEqual(index, var_truck.time_remaining) self.assertEqual(None, var_truck.current_order)