@mock.patch.object(shade.OpenStackCloud, 'nova_client')
    def test_list_hypervisors(self, mock_nova):
        mock_nova.hypervisors.list.return_value = [
            fakes.FakeHypervisor('1', 'testserver1'),
            fakes.FakeHypervisor('2', 'testserver2'),
        ]

        r = self.cloud.list_hypervisors()
        mock_nova.hypervisors.list.assert_called_once_with()
        self.assertEquals(2, len(r))
        self.assertEquals('testserver1', r[0]['hypervisor_hostname'])
        self.assertEquals('testserver2', r[1]['hypervisor_hostname'])
Initializes a URL route.
dataset/ETHPy150Open openstack-infra/shade/shade/tests/unit/test_shade_operator.py/TestShadeOperator.test_list_hypervisors--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/webapp2-2.3/webapp2_extras/routes.py/NamePrefixRoute.__init__