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
This commit is contained in:
Swapnil Kulkarni (coolsvap) 2016-01-07 14:19:28 +05:30
parent 366c6b729b
commit f84d82dc70

View File

@ -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