From: Kevin L. Mitchell Date: Mon, 22 Sep 2014 17:18:11 +0000 (-0500) Subject: Eliminate OrderedDict from test_api_v2.py X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=c756d3c3ca9e90fab5e1d3ff37af33972747ba70;p=openstack-build%2Fneutron-build.git Eliminate OrderedDict from test_api_v2.py Neutron cannot possibly be passing tests under Python 2.6, as neutron/tests/unit/test_api_v2.py is referencing collections.OrderedDict, which does not exist in Python 2.6. Since there is no reason to use an OrderedDict in this case, this replaces it with a simple dict. Change-Id: I1b9886f508c4c8b96cf50c50f157c1960da433fc Closes-Bug: #1372571 --- diff --git a/neutron/tests/unit/test_api_v2.py b/neutron/tests/unit/test_api_v2.py index e2ee2aacb..842ec9cf8 100644 --- a/neutron/tests/unit/test_api_v2.py +++ b/neutron/tests/unit/test_api_v2.py @@ -13,7 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -import collections import os import mock @@ -145,7 +144,7 @@ class APIv2TestCase(APIv2TestBase): def _get_collection_kwargs(self, skipargs=[], **kwargs): args_list = ['filters', 'fields', 'sorts', 'limit', 'marker', 'page_reverse'] - args_dict = collections.OrderedDict( + args_dict = dict( (arg, mock.ANY) for arg in set(args_list) - set(skipargs)) args_dict.update(kwargs) return args_dict