Skip to content
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

OPTIONS method is not allowed #15

Closed
reteptilian opened this issue Feb 2, 2017 · 3 comments
Closed

OPTIONS method is not allowed #15

reteptilian opened this issue Feb 2, 2017 · 3 comments

Comments

@reteptilian
Copy link

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?

@gawel
Copy link
Owner

gawel commented Feb 3, 2017

It's really easy to override:

TestApp(HostProxy(uri, 'requests', allowed_metods))

But I have no objections if you want to add this verb

@reteptilian
Copy link
Author

reteptilian commented Feb 3, 2017

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.

@gawel
Copy link
Owner

gawel commented Feb 3, 2017

Again, feel free to make a PR to add the verb if it make things easier for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants