Merge branch 'issue_4620' of https://github.com/jimi-c/ansible into jimi-c-issue_4620

This commit is contained in:
James Cammarata 2014-02-24 20:30:25 -06:00
commit f23ccebbdc
2 changed files with 17 additions and 17 deletions

View file

@ -207,6 +207,11 @@ class TestInventory(unittest.TestCase):
inventory.subset('odin;thor,loki')
self.assertEqual(sorted(inventory.list_hosts()), sorted(['thor','odin','loki']))
def test_subset_range(self):
inventory = self.simple_inventory()
inventory.subset('greek[0-2];norse[0]')
self.assertEqual(sorted(inventory.list_hosts()), sorted(['zeus','hera','thor']))
def test_subset_filename(self):
inventory = self.simple_inventory()
inventory.subset('@' + os.path.join(self.test_dir, 'restrict_pattern'))