vmware-nsx/neutron
Sam Betts e506daba20 Predictable field and filter ordering
This fixes the fields and filters units tests that break with a
randomized PYTHONHASHSEED (see the bug report).

The RESOURCE_ATTRIBUTE_MAP is stored as a dict leading to an
unpredictable output order. Values in kvp strings are being stored as
sets underpinned by dicts when converted, leading to unpredictable
ordering of values when read.

Discovered with PYTHONHASHSEED = 2455351445 on these tests:
test_api_v2.APIv2TestCase.test_fields
test_api_v2.APIv2TestCase.test_fields_multiple
test_api_v2.FiltersTestCase.test_attr_info_with_convert_list_to
test_api_v2.APIv2TestCase.test_filters_with_fields
test_api_v2.APIv2TestCase.test_fields_multiple_with_empty

There are 3 parts to this fix:
1. Update the APIv2TestCase _do_field_list function to construct
field list in the same order as the controller constructs its list.
2. Ensure the APIv2TestCase _get_collection_kwargs maintains order
throughout.
3. Use new assertOrderedEqual function to sort values before assertion
in test_attr_info_with_convert_list_to

Change-Id: I547cfa80cf83b0340b459279df9283443562326b
Partial-bug: #1348818
2014-08-11 17:33:24 +01:00
..
agent Merge "Improve external gateway update handling" 2014-08-08 05:48:33 +00:00
api Merge "Return 403 instead of 404 on attr policy failures" 2014-08-07 22:01:41 +00:00
cmd Move ARP responder test to sanity command 2014-07-29 18:44:07 +03:00
common Merge "Make sure that gateway is in CIDR range by default" 2014-08-05 07:54:22 +00:00
db Merge "l3_db: refactor L3_NAT_DB_mixin" 2014-08-08 07:16:20 +00:00
debug Remove the useless vim modelines 2014-06-21 15:07:31 +08:00
extensions Add L3 Scheduler Changes for Distributed Routers 2014-07-29 23:10:17 -07:00
hacking Add missing translation support 2014-05-19 12:16:56 +02:00
locale Imported Translations from Transifex 2014-08-06 06:04:23 +00:00
notifiers Fix spelling mistakes 2014-08-01 16:10:23 +00:00
openstack Fix spelling mistakes 2014-08-01 16:10:23 +00:00
plugins Merge "Fix to enable L2pop to serve DVR" 2014-08-07 19:05:00 +00:00
scheduler Fix DB Duplicate error when scheduling distributed routers 2014-08-01 06:51:45 -07:00
server Configure agents using neutron.common.config.init (formerly .parse) 2014-06-17 21:56:24 +02:00
services Merge "Exit Firewall Agent if config is invalid" 2014-08-05 21:54:12 +00:00
tests Predictable field and filter ordering 2014-08-11 17:33:24 +01:00
__init__.py Remove the useless vim modelines 2014-06-21 15:07:31 +08:00
auth.py Remove the useless vim modelines 2014-06-21 15:07:31 +08:00
context.py Remove the useless vim modelines 2014-06-21 15:07:31 +08:00
hooks.py Remove the useless vim modelines 2014-06-21 15:07:31 +08:00
manager.py Moved rpc_compat.py code back into rpc.py 2014-06-24 10:35:39 +02:00
neutron_plugin_base_v2.py Renamed start_rpc_listener -> start_rpc_listeners 2014-06-19 12:58:01 +02:00
policy.py Allow to import _LC, _LE, _LI and _LW functions directly 2014-07-17 14:56:19 +00:00
quota.py Remove the useless vim modelines 2014-06-21 15:07:31 +08:00
service.py Moved rpc_compat.py code back into rpc.py 2014-06-24 10:35:39 +02:00
version.py Remove the useless vim modelines 2014-06-21 15:07:31 +08:00
wsgi.py Remove the useless vim modelines 2014-06-21 15:07:31 +08:00