From: Christy Perez <christy(a)linux.vnet.ibm.com>
Signed-off-by: Christy Perez <christy(a)linux.vnet.ibm.com>
---
tests/test_model.py | 4 ++--
tests/test_rest.py | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/test_model.py b/tests/test_model.py
index bd195b5..ad0dccd 100644
--- a/tests/test_model.py
+++ b/tests/test_model.py
@@ -829,9 +829,9 @@ class ModelTests(unittest.TestCase):
# and make sure both of them complete successfully
task1 = inst.vm_clone(name)
task2 = inst.vm_clone(name)
- clone1_name = task1['target_uri'].split('/')[-1]
+ clone1_name = task1['target_uri'].split('/')[-2]
rollback.prependDefer(inst.vm_delete, clone1_name)
- clone2_name = task2['target_uri'].split('/')[-1]
+ clone2_name = task2['target_uri'].split('/')[-2]
rollback.prependDefer(inst.vm_delete, clone2_name)
inst.task_wait(task1['id'])
task1 = inst.task_lookup(task1['id'])
diff --git a/tests/test_rest.py b/tests/test_rest.py
index 686d54c..65c3db5 100644
--- a/tests/test_rest.py
+++ b/tests/test_rest.py
@@ -292,7 +292,7 @@ class RestTests(unittest.TestCase):
wait_task(self._task_lookup, task['id'])
task = json.loads(self.request('/tasks/%s' % task['id'],
'{}').read())
self.assertEquals('finished', task['status'])
- clone_vm_name = task['target_uri'].split('/')[-1]
+ clone_vm_name = task['target_uri'].split('/')[-2]
self.assertTrue(re.match(u'test-vm-clone-\d+', clone_vm_name))
resp = self.request('/vms/test-vm', '{}')
--
2.1.0