[Kimchi-devel] [PATCH] Kimchi: Fix some test cases on test_mockmodel.py

Aline Manera alinefm at linux.vnet.ibm.com
Tue Oct 20 16:07:06 UTC 2015



On 19/10/2015 14:51, Lucio Correia wrote:
> This patch was replaced by "Fix issue #738 - Part 2: Split Wok and 
> Kimchi object stores". Only the last chunk was included.

Ok. Thanks

>
> On 14-10-2015 16:19, Aline Manera wrote:
>> This patch depends on "[Kimchi-devel] [PATCH] Adjust Mockmodel to use 
>> the Task API from Wok"
>>
>> Signed-off-by: Aline Manera <alinefm at linux.vnet.ibm.com>
>> ---
>>   src/wok/plugins/kimchi/tests/test_mockmodel.py | 8 ++++----
>>   1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/src/wok/plugins/kimchi/tests/test_mockmodel.py 
>> b/src/wok/plugins/kimchi/tests/test_mockmodel.py
>> index ffbf8d5..7cbdbed 100644
>> --- a/src/wok/plugins/kimchi/tests/test_mockmodel.py
>> +++ b/src/wok/plugins/kimchi/tests/test_mockmodel.py
>> @@ -68,7 +68,7 @@ class MockModelTests(unittest.TestCase):
>>           req = json.dumps({'name': 'test-vm', 'template': 
>> '/templates/test'})
>>           resp = request(host, ssl_port, '/plugins/kimchi/vms', req, 
>> 'POST')
>>           task = json.loads(resp.read())
>> -        wait_task(model.task_lookup, task['id'])
>> +        wait_task(model.task.lookup, task['id'])
>>
>>           # Test screenshot refresh for running vm
>>           request(host, ssl_port, 
>> '/plugins/kimchi/vms/test-vm/start', '{}',
>> @@ -101,7 +101,7 @@ class MockModelTests(unittest.TestCase):
>>                                 'template': 
>> '/plugins/kimchi/templates/test'})
>>               task = json.loads(request(host, ssl_port, 
>> '/plugins/kimchi/vms',
>>                                 req, 'POST').read())
>> -            wait_task(model.task_lookup, task['id'])
>> +            wait_task(model.task.lookup, task['id'])
>>
>>           vms = [u'abc', u'bca', u'cab', u'xba']
>>           for vm in vms:
>> @@ -115,7 +115,7 @@ class MockModelTests(unittest.TestCase):
>>                                   'cdrom': fake_iso})
>>           task = model.vms_create({'name': u'test-vm',
>>                                    'template': 
>> '/plugins/kimchi/templates/test'})
>> -        wait_task(model.task_lookup, task['id'])
>> +        wait_task(model.task.lookup, task['id'])
>>           vms = model.vms_get_list()
>>           self.assertEquals(2, len(vms))
>>           self.assertIn(u'test-vm', vms)
>> @@ -135,7 +135,7 @@ class MockModelTests(unittest.TestCase):
>>           self.assertEquals(get_template_default('old', 'memory'),
>>                             info['memory'])
>>           self.assertEquals(1, info['cpus'])
>> -        self.assertEquals('images/icon-vm.png', info['icon'])
>> +        self.assertEquals('plugins/kimchi/images/icon-vm.png', 
>> info['icon'])
>>           self.assertEquals(stats_keys, set(info['stats'].keys()))
>>           self.assertEquals('vnc', info['graphics']['type'])
>>           self.assertEquals('127.0.0.1', info['graphics']['listen'])
>>
>
>




More information about the Kimchi-devel mailing list