]> 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)
committerDane LeBlanc <leblancd@cisco.com>
Wed, 19 Feb 2014 21:41:48 +0000 (16:41 -0500)
commitb6a8aea4d1fe8be6073af57fad2ab6863d8f359c
tree3cead6a6709fd427cab5fec5d67a50bbf8fa0d55
parent0b2d56cda70c1619489f15c3cf70763157b880f1
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]