• Jérome Perrin's avatar
    ERP5Type: make sure we can use mock in tests · f131bbb3
    Jérome Perrin authored
    In ERP5 software release we now have `mock` egg installed, so we can use it in tests instead of doing manually like this:
    
    ```python
    saved_method = Class.method
    def patched_method():
      ...
    try:
       Class.method = patched_method
       ...
    finally:
       Class.method = saved_method
    ```
    
    /reviewed-on nexedi/erp5!882
    f131bbb3
testERP5Type.py 139 KB