]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Improve unit test coverage for Cisco plugin model code
authorDane LeBlanc <leblancd@cisco.com>
Thu, 21 Nov 2013 17:34:57 +0000 (12:34 -0500)
committerThomas Goirand <thomas@goirand.fr>
Thu, 13 Mar 2014 07:20:25 +0000 (15:20 +0800)
commit6018cdf55ad2f6e1b0a7570ce8b663cef2c9f2f7
treeb46693c3db2dc6ae6cba0458f20dc46e50c65e0c
parent723cdaeeac7dc5db0331561aa44f510c1387191f
Improve unit test coverage for Cisco plugin model code

Closes-Bug: #1190620

This fix improves unit test coverage for:
quantum/plugins/cisco/models/virt_phy_sw_v2.py
Test coverage is improved from about 78% to 99%.

One change included in this fix is removal of some code in
the _invoke_plugin() method in virt_phy_sw_v2.py which looks
like it's attempting to handle the case where the number of
arguments being passed to _invoke_plugin() exceeds the number
of arguments expected for the target plugin method. This
section of code does not get executed for any existing
calls to _invoke_plugin(), and it doesn't appear that
this logic would work (except when the target plugin method
includes a **kwargs expansion).

Change-Id: Ibceb7a462a213f3ba693bcbe94e77d97b2e1440a
neutron/plugins/cisco/models/virt_phy_sw_v2.py
neutron/plugins/cisco/network_plugin.py
neutron/tests/unit/cisco/test_network_plugin.py
neutron/tests/unit/cisco/test_plugin_model.py [new file with mode: 0755]