From d269657089e93e304a33dcbc35b7c4abc6e9900d Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Fri, 3 Jul 2015 15:58:03 +0000 Subject: [PATCH] Python3: do not add dict_values objects In Python 3, dict.values returns a dict_values object instead of a list. Change-Id: I83bc7718ac9bbb64187fefae57ce835fbe225829 Blueprint: neutron-python3 --- neutron/tests/unit/db/test_db_base_plugin_v2.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/neutron/tests/unit/db/test_db_base_plugin_v2.py b/neutron/tests/unit/db/test_db_base_plugin_v2.py index adcfcb7eb..6fef2cbbd 100644 --- a/neutron/tests/unit/db/test_db_base_plugin_v2.py +++ b/neutron/tests/unit/db/test_db_base_plugin_v2.py @@ -4110,8 +4110,10 @@ class TestSubnetsV2(NeutronDbPluginV2TestCase): self.fmt) res = self.deserialize(self.fmt, req.get_response(self.api)) self.assertEqual(len(res['subnet']['allocation_pools']), 2) - res_vals = res['subnet']['allocation_pools'][0].values() +\ - res['subnet']['allocation_pools'][1].values() + res_vals = ( + list(res['subnet']['allocation_pools'][0].values()) + + list(res['subnet']['allocation_pools'][1].values()) + ) for pool_val in ['10', '20', '30', '40']: self.assertTrue('192.168.0.%s' % (pool_val) in res_vals) if with_gateway_ip: -- 2.45.2