

def test_filter_nodes_env(self):
    'Should filter nodes belonging to a given environment'
    data = chef.filter_nodes(chef.get_nodes_extended(), 'production')
    self.assertEqual(len(data), 8)
    data = chef.filter_nodes(chef.get_nodes_extended(), 'staging')
    self.assertEqual(len(data), 1)
    data = chef.filter_nodes(chef.get_nodes_extended(), 'non_existing_env')
    self.assertEqual(len(self), 0)

dataset/ETHPy150Open edelight/kitchen/kitchen/backends/tests.py TestData.test_filter_nodes_env/VarMisuse@87/136 `data`->`self`