From ce88b25c477554c6d569cc9cf0da62459c66fed5 Mon Sep 17 00:00:00 2001 From: Chris Krelle Date: Wed, 25 Nov 2015 08:26:31 -0800 Subject: [PATCH] Follow up patch to address reviewer comments on 241770 Corrects doc string and order of assert values in review 241770 (I02e79b635202a7933ae641b9d27cc19a75b7bc4f). Change-Id: If2f99cbb4d330321531d541d92fccd9271f0feec --- bifrost/tests/unit/test_inventory.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bifrost/tests/unit/test_inventory.py b/bifrost/tests/unit/test_inventory.py index a84652007..c1ff3e6a4 100644 --- a/bifrost/tests/unit/test_inventory.py +++ b/bifrost/tests/unit/test_inventory.py @@ -13,10 +13,10 @@ # under the License. """ -test_bifrost +test_inventory ---------------------------------- -Tests for `bifrost` module. +Tests for `inventory` module. """ from bifrost import inventory @@ -31,11 +31,11 @@ class TestBifrostInventory(base.TestCase): self.assertIn("localhost", groups) self.assertDictEqual(hostvars, {}) localhost_value = dict(hosts=["127.0.0.1"]) - self.assertDictEqual(groups['localhost'], localhost_value) + self.assertDictEqual(localhost_value, groups['localhost']) def test__val_or_none(self): array = ['no', '', 'yes'] - self.assertEqual(inventory._val_or_none(array, 0), 'no') - self.assertEqual(inventory._val_or_none(array, 1), None) - self.assertEqual(inventory._val_or_none(array, 2), 'yes') - self.assertEqual(inventory._val_or_none(array, 4), None) + self.assertEqual('no', inventory._val_or_none(array, 0)) + self.assertEqual(None, inventory._val_or_none(array, 1)) + self.assertEqual('yes', inventory._val_or_none(array, 2)) + self.assertEqual(None, inventory._val_or_none(array, 4))