Use assertEqual() instead of assertDictEqual()
In unittest2, assertDictEqual() is implemented by using != operator to compare two dicts. So is assertEqual() in testtools. assertEqual() in testtools is able to handle dict, list, set and so on. So we just call assertEqual() to make the unit tests simpler. Change-Id: I5eeeebced716f2065e81d72a9972392ae3a45d89
This commit is contained in:
@@ -46,7 +46,7 @@ class TestKeyValueAction(utils.TestCase):
|
||||
actual = getattr(results, 'property', {})
|
||||
# All should pass through unmolested
|
||||
expect = {'red': '', 'green': '100%', 'blue': '50%', 'format': '#rgb'}
|
||||
self.assertDictEqual(expect, actual)
|
||||
self.assertEqual(expect, actual)
|
||||
|
||||
def test_error_values(self):
|
||||
self.assertRaises(
|
||||
|
||||
Reference in New Issue
Block a user