YAML inventory unit test: add tests

Relates: #33878
pull/34117/head
Pierre-Louis Bonicoli 7 years ago committed by Brian Coca
parent 35a4fe8546
commit 737920cd89

@ -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('test1'), im._inventory.groups['all'].hosts)
self.assertIn(im._inventory.get_host('test2'), 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.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): def _get_inventory(self, inventory_content):

Loading…
Cancel
Save