]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Do not assume order of body and tags elements
authorJacek Swiderski <jacek.swiderski@codilime.com>
Wed, 6 Aug 2014 09:23:16 +0000 (11:23 +0200)
committerJacek Swiderski <jacek.swiderski@codilime.com>
Tue, 23 Sep 2014 17:46:20 +0000 (17:46 +0000)
commitd5b90315d2ff647179fd91512377a7f21a57ef0a
tree48cb46c3c960e6ecf6d792e8bbbd80e6bec99439
parenta76af4ade3c751a4372a427989035cf8c32342b0
Do not assume order of body and tags elements

This fixes the l2gateway unit test that breaks with a randomized PYTHONHASHSEED
(see the bug report).

The test assumed that the body dict from self._create_expected_req_body
had elements (including contents of tags list) in a particular order.
Found with PYTHONHASHSEED=2455351445.
The fix ensures that body is in predictable order.

Partial-bug: #1348818
Note: There are several other unrelated unit tests that also break with a
randomized PYTHONHASHSEED, but they are not addressed here. They will be
addressed in separate patches.

Change-Id: I423b68aff58486c113d0e5c5f4726f9eabf6920e
neutron/plugins/vmware/common/utils.py
neutron/plugins/vmware/nsxlib/l2gateway.py
neutron/tests/unit/vmware/nsxlib/test_l2gateway.py