Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

password_security module throws warning during tests #141

Closed
jmcvetta opened this issue Oct 17, 2019 · 2 comments
Closed

password_security module throws warning during tests #141

jmcvetta opened this issue Oct 17, 2019 · 2 comments
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.

Comments

@jmcvetta
Copy link

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.

@pedrobaeza
Copy link
Member

Odoo version? Can you propose the pull request?

@github-actions
Copy link

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jan 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

No branches or pull requests

2 participants