YAML inventory unit test: add tests

Relates: #33878
This commit is contained in:
Pierre-Louis Bonicoli 2017-12-13 23:02:11 +01:00 committed by Brian Coca
parent 35a4fe8546
commit 737920cd89

View file

@ -180,6 +180,9 @@ class TestInventoryPlugins(unittest.TestCase):
self.assertIn(im._inventory.get_host('test1'), im._inventory.groups['all'].hosts)
self.assertIn(im._inventory.get_host('test2'), im._inventory.groups['all'].hosts)
self.assertEqual(len(im._inventory.groups['all'].hosts), 2)
self.assertIn(im._inventory.get_host('test1'), im._inventory.groups['ungrouped'].hosts)
self.assertIn(im._inventory.get_host('test2'), im._inventory.groups['ungrouped'].hosts)
self.assertEqual(len(im._inventory.groups['ungrouped'].hosts), 2)
def _get_inventory(self, inventory_content):