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: Ice343b2ce468acae39d2ad79f7121503e3627656
This commit is contained in:
Tang Chen 2016-07-25 15:09:49 +08:00
parent a8880e8b34
commit bcaa5c2e0e
2 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,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(

View File

@ -1793,4 +1793,4 @@ class TestServerGeneral(TestServer):
server_detail.pop('networks')
# Check the results.
self.assertDictEqual(info, server_detail)
self.assertEqual(info, server_detail)