summaryrefslogtreecommitdiff
path: root/nova/tests/unit/compute/test_host_api.py
diff options
context:
space:
mode:
Diffstat (limited to 'nova/tests/unit/compute/test_host_api.py')
-rw-r--r--nova/tests/unit/compute/test_host_api.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/tests/unit/compute/test_host_api.py b/nova/tests/unit/compute/test_host_api.py
index 18e91eb829..376273c5f5 100644
--- a/nova/tests/unit/compute/test_host_api.py
+++ b/nova/tests/unit/compute/test_host_api.py
@@ -176,8 +176,8 @@ class ComputeHostAPITestCase(test.TestCase):
def test_service_get_all_cells(self):
cells = objects.CellMappingList.get_all(self.ctxt)
for cell in cells:
- with context.target_cell(self.ctxt, cell):
- objects.Service(context=self.ctxt,
+ with context.target_cell(self.ctxt, cell) as cctxt:
+ objects.Service(context=cctxt,
binary='nova-compute',
host='host-%s' % cell.uuid).create()
services = self.host_api.service_get_all(self.ctxt, all_cells=True)