patrys / httmock

A mocking library for requests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

poor documentation

juliabiro opened this issue · comments

please elaborate on how to capture complex urls with urlmatch. the query, scheme etc parameters are not mentioned anywhere in the documentation, neither is the fact that you cannot match for exacts complex urls with the url parameter. Otherwise great tool, but it took several hours to figure out how to use it.

+1 also some trace logging about what is being mocked would be great

👍 i can't find any docs at all besides the short README

Good example is here https://www.appneta.com/blog/python-unit-test-mock/ and the source files to go with it showing a nice way of doing domain / url based matching https://github.com/danriti/python-mocked-service

+1 for some more documentation. I have just gotcha'd by the having to match the remote address and path separately.

It would also be great if there was a way of implementing a 'catchall' to catch all requests that do not match the given paths, so that you can use the mock to trap bugs due to incorrect paths & spellings. Let me know if this should be logged as a separate issue.

While the documentation would be great to have, you can have multiple handlers active at the same time, each with its own matching rules. If you make the outer-most match all requests, it should give you the catch-all you described.

yes, more documentation would be great!