The password_security module throws a warning during tests. Although it is just a warning, it makes odoo.sh flag the tests as yellow. So an Odoo instance using password_security cannot pass its tests on odoo.sh.
Sample warning from the log:
2019-10-10 11:18:13,150 7 WARNING jmcvetta-dev-632767 odoo.http: <function odoo.addons.password_security.controllers.main.web_auth_signup> returns an invalid response type for an http request
Warning is thrown from within odoo.http.route decorator, which is wrapping password_security.controllers.main.web_auth_signup().
Within that method we have the line:
return request.render('auth_signup.signup', qcontext)
@route is unhappy because the response from request.render() is an instance of MagicMock. Whereas @route is expecting an instance of odoo.http.Response, or one of a few other types.
Need to change the mocking setup, so the MagicMock object will report itself as an instance of odoo.http.Response.
The
password_securitymodule throws a warning during tests. Although it is just a warning, it makes odoo.sh flag the tests as yellow. So an Odoo instance usingpassword_securitycannot pass its tests on odoo.sh.Sample warning from the log:
Warning is thrown from within
odoo.http.routedecorator, which is wrappingpassword_security.controllers.main.web_auth_signup().Within that method we have the line:
@routeis unhappy because the response fromrequest.render()is an instance ofMagicMock. Whereas@routeis expecting an instance ofodoo.http.Response, or one of a few other types.Need to change the mocking setup, so the
MagicMockobject will report itself as an instance ofodoo.http.Response.