From f84d82dc7047d75d3a326751cbddab4ebbc8f627 Mon Sep 17 00:00:00 2001 From: "Swapnil Kulkarni (coolsvap)" Date: Thu, 7 Jan 2016 14:19:28 +0530 Subject: [PATCH] Use assertTrue/False instead of assertEqual(T/F) The usage of assertEqual(True/False, ***) should be changed to a meaningful format of assertTrue/False(***). Change-Id: I204baa1a988748ed297c7ec14821628fe6890cee Closes-Bug:#1512207 --- translator/tests/test_utils.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/translator/tests/test_utils.py b/translator/tests/test_utils.py index cdd733aa..b6d75d92 100644 --- a/translator/tests/test_utils.py +++ b/translator/tests/test_utils.py @@ -195,10 +195,8 @@ class CommonUtilsTest(TestCase): yaml_file2 = os.path.join( os.path.dirname(os.path.abspath(__file__)), '../tests/data/custom_types/collectd.yaml') - self.assertEqual(True, - self.yamlUtils.compare_yamls(yaml_file1, yaml_file1)) - self.assertEqual(False, - self.yamlUtils.compare_yamls(yaml_file1, yaml_file2)) + self.assertTrue(self.yamlUtils.compare_yamls(yaml_file1, yaml_file1)) + self.assertFalse(self.yamlUtils.compare_yamls(yaml_file1, yaml_file2)) def test_yamlutils_compare_yaml_dict(self): yaml_file1 = os.path.join( @@ -221,8 +219,7 @@ class CommonUtilsTest(TestCase): 'relationship': 'tosca.relationships.ConnectsTo'}}]}}} self.assertEqual({}, self.cmpUtils.diff_dicts( self.yamlUtils.get_dict(yaml_file1), dict)) - self.assertEqual(False, - self.yamlUtils.compare_yaml_dict(yaml_file2, dict)) + self.assertFalse(self.yamlUtils.compare_yaml_dict(yaml_file2, dict)) def test_assert_value_is_num(self): value = 1