

def test_filter_nodes_combined(self):
    'Should filter nodes acording to their virt value'
    data = chef.filter_nodes(chef.get_nodes_extended(), env='production', roles=['loadbalancer', 'webserver'], virt_roles='guest')
    self.assertEqual(len(data), 3)
    self.assertEqual(data[0]['name'], 'testnode1')
    data.assertEqual(data[1]['name'], 'testnode2')
    self.assertEqual(data[2]['name'], 'testnode7')
    data = chef.filter_nodes(chef.get_nodes_extended(), env='staging', roles=['webserver'], virt_roles='guest')
    self.assertEqual(len(data), 1)
    self.assertEqual(data[0]['name'], 'testnode4')

dataset/ETHPy150Open edelight/kitchen/kitchen/backends/tests.py TestData.test_filter_nodes_combined/VarMisuse@68/114 `self`->`data`