def unpatch_policies(f):
 @functools.wraps(f)
 def wrapper(*args, **kwargs):
  with patch_policies(_test_POLICIES):
   return f(*args, **kwargs)
 return wrapper

def unpatch_policies ( f ) : @ functools . wraps ( f ) def wrapper ( * args , ** kwargs ) : with patch_policies ( _test_POLICIES ) : return f ( * args , ** kwargs ) return wrapper
this will unset a testcase level patch_policies to use the module level policies setup for the _test_servers instead .