]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Ensure test_agent_manager handles random hashseeds
authorSam Betts <sam@code-smash.net>
Mon, 20 Oct 2014 09:59:13 +0000 (10:59 +0100)
committerSam Betts <sam@code-smash.net>
Mon, 20 Oct 2014 11:59:01 +0000 (12:59 +0100)
commit1da765d791cbbb03bcc49f2d0a9437ec2b71ac54
treee5c8bc11fa7eb36b82411ea5ed697c00e47b3516
parentf863e9c07711df8dd447693c45c7ac147718087a
Ensure test_agent_manager handles random hashseeds

Several tests in test_agent_manager.py fail when tox is run using the
hashseed 2701526934, this is down to the nature of using dictionaries
and sets in Python causing some function calls and function arguments
to be out of order. This patch fixes this by either specifying that
assert_has_calls does not need to assert the order, just that the calls
were made, or by letting the unit test get affected in the same way as
the code, e.g. add variables to a dict so they are ordered by the python
hashing algorithms in the same way as they would be in the real code.

Change-Id: If83d1f33c187eab45c2a65fd50fd70cce011c9e7
Partial-Bug: 1348818
neutron/tests/unit/services/loadbalancer/agent/test_agent_manager.py