]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Remove function replacement with mock patch
authorKevin Benton <blak111@gmail.com>
Fri, 30 May 2014 03:59:00 +0000 (20:59 -0700)
committerKevin Benton <blak111@gmail.com>
Fri, 30 May 2014 03:59:00 +0000 (20:59 -0700)
commit2df56ffe93fc5d0ce343df683d8846865b73b716
treeb0019e78437bb2e2abd2a633ef7be02cf81b905e
parente65b06f458f179c50f7b4d4f7ba269d7343ef461
Remove function replacement with mock patch

In the hyperv unit tests, an rpc method is
manually replaced with a MagicMock using setattr.
This prevents it from being cleaned up by mock.patch.stopall.
This patch replaces it with a short-lived patch call
in a with statement.

Change-Id: I7b10a8115c474977e3acd16dc49d6f3ae67b0c3b
Partial-Bug: #1316401
neutron/tests/unit/hyperv/test_hyperv_rpcapi.py