]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Alter unit test to match bug and cleanup ext logic
authorKevin Benton <blak111@gmail.com>
Fri, 17 Jul 2015 01:45:30 +0000 (18:45 -0700)
committerKevin Benton <blak111@gmail.com>
Fri, 17 Jul 2015 02:01:25 +0000 (19:01 -0700)
commitc5cb76315f0af0ab03185575bec91210f61c13e5
tree87d77d792474d502f77d22a65304364416f87bb4
parent312bd47265749a4f4e36d3784330ea4f568a9b8c
Alter unit test to match bug and cleanup ext logic

The unit test for bug #1443342 was only testing that a side effect
leading to the bug didn't occur (comparing object identities). This
patch updates the unit test to fully assert that the bug itself
doesn't occur without checking implementation details.

This also eliminates the branching that led to the original issue by
using setdefault to always return a dict to update.

Related-Bug: #1443342
Change-Id: I6c48681aa49c17bbadffa12bad1eea272c483437
neutron/api/extensions.py
neutron/tests/unit/api/test_extensions.py