Merge "Use assertEqual() instead of assertDictEqual()"

This commit is contained in:
Jenkins 2016-09-27 11:47:32 +00:00 committed by Gerrit Code Review
commit 2b0532e8ee
3 changed files with 5 additions and 5 deletions

View File

@ -55,8 +55,8 @@ class NetworkTestCase(test.TestCase):
dns_nameservers=["1.2.3.4", "5.6.7.8"])) dns_nameservers=["1.2.3.4", "5.6.7.8"]))
self.assertEqual(context.config["networks_per_tenant"], 42) self.assertEqual(context.config["networks_per_tenant"], 42)
self.assertEqual(context.config["start_cidr"], "foo_cidr") self.assertEqual(context.config["start_cidr"], "foo_cidr")
self.assertDictEqual(context.config["network_create_args"], self.assertEqual(context.config["network_create_args"],
{"fakearg": "fake"}) {"fakearg": "fake"})
self.assertEqual(context.config["dns_nameservers"], self.assertEqual(context.config["dns_nameservers"],
("1.2.3.4", "5.6.7.8")) ("1.2.3.4", "5.6.7.8"))

View File

@ -69,7 +69,7 @@ class ExistingNetworkTestCase(test.TestCase):
for net_wrapper in net_wrappers.values(): for net_wrapper in net_wrappers.values():
net_wrapper.list_networks.assert_called_once_with() net_wrapper.list_networks.assert_called_once_with()
self.assertDictEqual( self.assertEqual(
self.context["tenants"], self.context["tenants"],
{ {
"tenant1": {"networks": networks[0:2]}, "tenant1": {"networks": networks[0:2]},

View File

@ -122,7 +122,7 @@ class CeilometerScenarioTestCase(test.ScenarioTestCase):
name=self.scenario.generate_random_name.return_value) name=self.scenario.generate_random_name.return_value)
# ensure that _create_alarm() doesn't modify the alarm dict as # ensure that _create_alarm() doesn't modify the alarm dict as
# a side-effect # a side-effect
self.assertDictEqual(alarm_dict, orig_alarm_dict) self.assertEqual(alarm_dict, orig_alarm_dict)
self._test_atomic_action_timer(self.scenario.atomic_actions(), self._test_atomic_action_timer(self.scenario.atomic_actions(),
"ceilometer.create_alarm") "ceilometer.create_alarm")
@ -141,7 +141,7 @@ class CeilometerScenarioTestCase(test.ScenarioTestCase):
"alarm-id", **alarm_diff) "alarm-id", **alarm_diff)
# ensure that _create_alarm() doesn't modify the alarm dict as # ensure that _create_alarm() doesn't modify the alarm dict as
# a side-effect # a side-effect
self.assertDictEqual(alarm_diff, orig_alarm_diff) self.assertEqual(alarm_diff, orig_alarm_diff)
self._test_atomic_action_timer(self.scenario.atomic_actions(), self._test_atomic_action_timer(self.scenario.atomic_actions(),
"ceilometer.update_alarm") "ceilometer.update_alarm")