]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Improve test_set_members_deleting_less_than_5
authorCedric Brandily <zzelle@gmail.com>
Wed, 27 May 2015 06:53:00 +0000 (08:53 +0200)
committerCedric Brandily <zzelle@gmail.com>
Fri, 29 May 2015 16:29:47 +0000 (16:29 +0000)
commit9ff8cd524621daf6cd20da939238eee14b5a231f
tree2f984713c4cf0c03a5f111963124196f7c67c3d9
parent77303fbeaa060bcee2befad65dccb457fbb6ab65
Improve test_set_members_deleting_less_than_5

In test_set_members_deleting_less_than_5[1], 3 ips are deleted from
ipset but test_set_members_deleting_less_than_5 checked that the
first one was deleted because the call ordering was non-trivial.

The test was successful because
assert_has_calls(expected_calls, any_order=False) allows extra calls
before and after expected_calls.

A parent change[2] forces the call ordering, this allows to check that
the 3 ips are deleted.

[1] neutron.tests.unit.agent.linux.test_ipset_manager
[2] I8408365825ec1e97a83c2181f38ec1f9468df91e

Related-Bug: #1348818

Change-Id: I773e2cd19fdec634b728d0c3a78c1d66392c743f
neutron/tests/unit/agent/linux/test_ipset_manager.py