[17.0][FWD] endpoint: forward-port querystring params usage - #114
[17.0][FWD] endpoint: forward-port querystring params usage#114SilvioC2C wants to merge 3 commits into
endpoint: forward-port querystring params usage#114Conversation
|
Hi @simahawk, |
|
NB: tests are failing for reasons unrelated to these commits |
Compatibility w/ OCA/web-api#114
simahawk
left a comment
There was a problem hiding this comment.
can we have a test update?
| handler = self_with_user._get_handler() | ||
| try: | ||
| res = handler(request) | ||
| # In case the handler does not support params |
There was a problem hiding this comment.
I would simply let it fail. Or if you really want you can catch a TypeError and log it. But I would just let it break. Beside, I doubt anyone did ever implement a different handler :)
|
@simahawk would it be better to make a commit in the v14 PR and port it here, or would suggest a commit here for simplicity? |
|
we can backport it later |
|
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
|
@simahawk mind re-opening/re-reviewing this PR? |
|
Hi @simahawk, |
Compatibility w/ OCA/web-api#114
| handler = self_with_user._get_handler() | ||
| try: | ||
| res = handler(request) | ||
| # In case the handler does not support params |
| response = self.url_open("/demo/bad_method", data="ok") | ||
| self.assertEqual(response.status_code, 405) | ||
|
|
||
| def test_call8(self): |
There was a problem hiding this comment.
I'm not sure to understand how this test is supposed to work. You should pass params in the query string no?
| if not self._code_snippet_valued(): | ||
| return {} | ||
| eval_ctx = self._get_code_snippet_eval_context(request) | ||
| eval_ctx["querystring_params"] = querystring_params or {} |
There was a problem hiding this comment.
do we really need this? We have the request and as such we have request.params that contains the qs params.
Forward-port of #80
Also includes renaming usages of
paramstoquerystring_params