Signed-off-by: Lucio Correia <luciojhc(a)linux.vnet.ibm.com>
---
tests/test_model.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/tests/test_model.py b/tests/test_model.py
index f4a145f..a0fe36f 100644
--- a/tests/test_model.py
+++ b/tests/test_model.py
@@ -227,14 +227,17 @@ class ModelTests(unittest.TestCase):
# snapshot revert to the first created vm
result = inst.vmsnapshot_revert(u'kimchi-vm-new',
params['name'])
- self.assertEquals(result, [u'kimchi-vm', snap['name']])
+ self.assertEquals(result, [u'kimchi-vm-new', snap['name']])
- vm = inst.vm_lookup(u'kimchi-vm')
+ vm = inst.vm_lookup(u'kimchi-vm-new')
self.assertEquals(vm['state'], snap['state'])
- current_snap = inst.currentvmsnapshot_lookup(u'kimchi-vm')
+ current_snap = inst.currentvmsnapshot_lookup(u'kimchi-vm-new')
self.assertEquals(params['name'], current_snap['name'])
+ # rename vm back
+ inst.vm_update('kimchi-vm-new', {'name':
u'kimchi-vm'})
+
self.assertRaises(NotFoundError, inst.vmsnapshot_delete,
u'kimchi-vm', u'foobar')
--
1.9.1