示例#1
0
文件: test_hosts.py 项目: nati/nova
    def test_list_hosts(self):
        """Verify that the compute hosts are returned."""
        hosts = os_hosts._list_hosts(self.req)
        self.assertEqual(hosts, HOST_LIST)

        compute_hosts = os_hosts._list_hosts(self.req, "compute")
        expected = [host for host in HOST_LIST if host["service"] == "compute"]
        self.assertEqual(compute_hosts, expected)
示例#2
0
文件: test_hosts.py 项目: xtoddx/nova
    def test_list_hosts(self):
        """Verify that the compute hosts are returned."""
        hosts = os_hosts._list_hosts(self.req)
        self.assertEqual(hosts, HOST_LIST)

        compute_hosts = os_hosts._list_hosts(self.req, "compute")
        expected = [host for host in HOST_LIST if host["service"] == "compute"]
        self.assertEqual(compute_hosts, expected)
示例#3
0
 def test_list_hosts_with_zone(self):
     req = FakeRequestWithNovaZone()
     hosts = os_hosts._list_hosts(req)
     self.assertEqual(hosts, HOST_LIST_NOVA_ZONE)
示例#4
0
 def test_list_hosts(self):
     # Verify that the compute hosts are returned.
     hosts = os_hosts._list_hosts(self.req)
     self.assertEqual(hosts, HOST_LIST['hosts'])
示例#5
0
 def test_list_hosts(self):
     """Verify that the compute hosts are returned."""
     hosts = os_hosts._list_hosts(self.req)
     self.assertEqual(hosts, HOST_LIST['hosts'])
示例#6
0
 def test_list_hosts(self):
     """Verify that the compute hosts are returned."""
     hosts = os_hosts._list_hosts(self.req)
     self.assertEqual(hosts, HOST_LIST["hosts"])