[openstack-dev] [Keystone] exceptions on wsgi.middlewarrs

heckj heckj at mac.com
Sun Feb 17 20:08:44 UTC 2013


I don't think there was an intentional omission there so much as the pattern that Andy used when he was rewriting the underlying kit a year ago. In the back of my head, I've been thinking "Oh, we should probably move to the oslo variation of that class", but never put any time looking deeply at the differences and seeing how we might bring them together.

Since trying to rationalize that all together while implementing a feature is virtual suicide, I'll instead point you towards tests/test_middleware in keystone, which is the whole sum of the middleware testing in keystone right now. (more testing in keystoneclient around the auth_token bits, as you might imagine). 
	https://github.com/openstack/python-keystoneclient/blob/master/tests/test_auth_token_middleware.py 
That might be a better template if you're looking to use an existing test setup as a template. 

- joe

On Feb 17, 2013, at 3:36 AM, Chmouel Boudjnah <chmouel at chmouel.com> wrote:
> Hello,
> 
> I am working on getting cors support for keystone:
> 
> https://github.com/chmouel/keystone/commit/7df77623223e32fa108a6cd7bfe0548e998c9c4e
> 
> and I am trying to use exception.Unauthorized instead of having to setup my 401/reason in my responses but this patch seems needed like we already do in wsgi.Applications:
> 
> https://gist.github.com/chmouel/4971044
> 
> Before sending this for reviews I am wondering if was omitted for a reason? .
> 
> Another question, where do we put tests for wsgi.Middleware, is it the middleware that implement the class who does the tests?
> 
> Thanks,
> Chmouel.
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130217/08447269/attachment.html>


More information about the OpenStack-dev mailing list