]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Add a double-mock guard to the base test case
authorKevin Benton <blak111@gmail.com>
Fri, 26 Jun 2015 01:34:38 +0000 (18:34 -0700)
committerKevin Benton <kevinbenton@buttewifi.com>
Fri, 26 Jun 2015 20:18:51 +0000 (20:18 +0000)
commit1b60df85ba3ad442c2e4e7e52538e1b9a1bf9378
treea71039dce79eefb0540fd49ec02833ca99d77e72
parent78700ba70620f7b53b5ae71332cca853f5afa467
Add a double-mock guard to the base test case

Use mock to patch mock with a check to prevent multiple active
patches to the same target. Multiple patches to the same target
result in non-deterministic behavior when stopall() tries to
undo the patches.[1]

1. http://bugs.python.org/issue21239

Change-Id: I3dd3d561a0267d80f464c15d69a4258b0a5e8aba
Closes-Bug: #1468998
neutron/tests/base.py