On 1/18/22 10:53 AM, Stephen Daniel wrote:
2nd follow-up. Apologies for spamming this list.
I went wandering through the code as suggested by the traceback. I discovered that thee "as_boolean" routine is expecting a string argument but getting a boolean argument.
So, If I send the booleans as strings, with values "true" or "false", all is well. This is not what the API documentation suggests I should do. Can someone either fix the documentation or the code?
Those snippets in the documentation are doctests. That code is actually
executed by unit testing and passes. In all those snippets, dump_json is
passing the second argument as data
to
mailman.testing.documentation.dump_json() which in turn calls
mailman.testing.documentation.call_http() which calls
mailman.testing.helpers.call_api() which ultimately calls
requests.request() with the same data
argument.
So basically, the issue is the difference between how requests.request()
handles that data
dictionary in creating the POST data and whatever
you are doing.
Possibly we could add some caveat to <https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/docs/documentation.html#documentation-helpers> or possibly elsewhere. Do you have a suggestion as to what?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan