Closed reteptilian closed 7 years ago
It's really easy to override:
TestApp(HostProxy(uri, 'requests', allowed_metods))
But I have no objections if you want to add this verb
Ah, thanks, I didn't know about that.
I use webtest's WEBTEST_TARGET_URL feature since I run my test suite in both modes ... both in process and also via external calls via WEBTEST_TARGET_URL and HostProxy. Unfortunately, webtest's WEBTEST_TARGET_URL logic doesn't give you the ability to customize HostProxy.
But it's nice to know I could pass in my own HostProxy. I'd just have to modify all the places where I create TestApps ... it's enough of a pain that for now I think I will stick with using a forked version of WSGIProxy2 with OPTIONS added to the allowed methods.
Again, feel free to make a PR to add the verb if it make things easier for you.
As hardcoded in proxies.py, OPTIONS is not one of the ALLOWED_METHODS.
This prevents me from fully testing my app via webtest (which uses wsgiproxy in one of its test modes).
Is there anything preventing you from adding it?