ERP5Type: make sure we can use mock in tests
In ERP5 software release we now have mock
egg installed, so we can use it in tests instead of doing manually like this:
saved_method = Class.method
def patched_method():
...
try:
Class.method = patched_method
...
finally:
Class.method = saved_method