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:
Tang Chen
2016-07-25 15:40:54 +08:00
parent a78b67ec53
commit 85c977ac7a

View File

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