I'm having a hard time with the Python mock library. I need it to have hooks.config_get return a string, either "" or the contents of a test certificate. However, the mock objects are evaluating to true, breaking the 'if ssl_cert:' logic I've added to hooks.
How can I get the mocked 'hooks.config_get' to provide a valid ssl_cert config value?
I'm having a hard time with the Python mock library. I need it to have hooks.config_get return a string, either "" or the contents of a test certificate. However, the mock objects are evaluating to true, breaking the 'if ssl_cert:' logic I've added to hooks.
How can I get the mocked 'hooks.config_get' to provide a valid ssl_cert config value?