diff --git a/climate/manager/service.py b/climate/manager/service.py index 97b0bc0c..3faf7ec8 100644 --- a/climate/manager/service.py +++ b/climate/manager/service.py @@ -416,7 +416,7 @@ class ManagerService(service_utils.RPCServer): self._basic_action(lease_id, event_id, 'on_end', 'deleted') def before_end_lease(self, lease_id, event_id): - pass + db_api.event_update(event_id, {'status': 'DONE'}) def _basic_action(self, lease_id, event_id, action_time, reservation_status=None): diff --git a/climate/tests/manager/test_service.py b/climate/tests/manager/test_service.py index b621893b..e3ad0336 100644 --- a/climate/tests/manager/test_service.py +++ b/climate/tests/manager/test_service.py @@ -1073,6 +1073,7 @@ class ServiceTestCase(tests.TestCase): def test_before_end_lease(self): self.manager.before_end_lease(self.lease_id, '1') + self.event_update.assert_called_once_with('1', {'status': 'DONE'}) def test_basic_action_no_res_status(self): self.patch(self.manager, 'get_lease').return_value = self.lease