'show() works correctly as expected.'

def test_show_works_correctly(self):

    ctxt = context_maker.get_admin_context()
    s_ref = self._create_compute_service()
    i_ref1 = _create_instance(project_id='p-01', host=s_ref['host'])
    i_ref2 = _create_instance(project_id='p-02', vcpus=3, host=s_ref['host'])
    result = self.controller.show(self.req, s_ref['host'])
    proj = ['(total)', '(used_now)', '(used_max)', 'p-01', 'p-02']
    column = ['host', 'project', 'cpu', 'memory_mb', 'disk_gb']
    self.assertEqual(len(result['host']), 5)
    for resource in result['host']:
        self.assertIn(resource['resource']['project'], proj)
        self.assertEqual(len(resource['resource']), 5)
        self.assertEqual(set(column), set(resource['resource'].keys()))
    db.service_destroy(ctxt, s_ref['id'])
    db.instance_destroy(ctxt, i_ref1['uuid'])
    db.instance_destroy(ctxt, i_ref2['uuid'])
