From 85c977ac7adbf17b32dc0466a8bea0be2259b90d Mon Sep 17 00:00:00 2001 From: Tang Chen Date: Mon, 25 Jul 2016 15:40:54 +0800 Subject: [PATCH] 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 --- osc_lib/tests/cli/test_parseractions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osc_lib/tests/cli/test_parseractions.py b/osc_lib/tests/cli/test_parseractions.py index beff04a..8f52e5a 100644 --- a/osc_lib/tests/cli/test_parseractions.py +++ b/osc_lib/tests/cli/test_parseractions.py @@ -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(