-
-
Notifications
You must be signed in to change notification settings - Fork 771
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
FIX a typo causing an ERROR log #523
Conversation
@mvalkon can you please add a test for this? Thanks! |
@hjacobs yup, I was working on that already but then realised this one is hard to test with the current test functions. I might have to add a test for the |
@hjacobs @flyte finally had a chance to look at the test, sorry for taking such a long time with this simple fix. The problem I have is that the only way I could think of to actually test this is to assert that certain logging messages are either present, or not. For example, in the case of #522, we could:
I can do this, but this means I'll have to introduce a backwards compatible library for testing logging messages (testfixtures for example). Do we think it's worth it for just this one test? |
@hjacobs I've added the test described. Let me know if you think this should be added. |
setup.py
Outdated
@@ -30,6 +30,7 @@ def read_version(package): | |||
'inflection>=0.3.1', | |||
'pathlib>=1.0.1; python_version < "3.4"', | |||
'typing>=3.6.1; python_version < "3.6"', | |||
'testfixtures>=5.3.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will pull in testfixtures
everywhere, but we only need it for tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, sorry about that. Added it in the requirements-devel.txt
9595cb6
to
c1def85
Compare
A small bug was introduced in spec-first#500 when sanitizing the request query parameters. Instead of fetching the arguments from `request.query`, the parameters were sanitized from the `request.form`. This causes an error log to be printed, as the parameters are not expected for the query (for example in the case of a POST request). Fixes spec-first#504
Adds a simple fixture to test form and query parameter sanitazion. This is mostly related to spec-first#522, in which the `formData` parameters were treated as query parameters.
@hjacobs ping |
👍 |
A small bug was introduced in #500 when sanitizing the request query
parameters. Instead of fetching the arguments from
request.query
,the parameters were sanitized from the
request.form
. This causes anerror log to be printed, as the parameters are not expected for the
query (for example in the case of a POST request).
Fixes #522