

def test_filter_nodes_virt(self):
    'Should filter nodes acording to their virt value'
    total_guests = 7
    total_hosts = 3
    data = chef.filter_nodes(chef.get_nodes_extended(), virt_roles='guest')
    self.assertEqual(len(data), total_guests)
    data = chef.filter_nodes(chef.get_nodes_extended(), virt_roles='host')
    self.assertEqual(len(data), total_hosts)
    data = chef.filter_nodes(chef.get_nodes_extended(), virt_roles='host,guest')
    self.assertEqual(len(data), TOTAL_NODES)

dataset/ETHPy150Open edelight/kitchen/kitchen/backends/tests.py TestData.test_filter_nodes_virt/original