hi list,

in myproject.lib.base I have

from tg import response
class BaseRestController(RestController):
    """
    Base class for the controllers in the application.
    """

    def __call__(self, environ, start_response):
        """Invoke the Controller"""
        response.headers["Access-Control-Allow-Origin"] = "*"
        return RestController.__call__(self, environ, start_response)


then I inherit

from myproject.lib.base import BaseRestController

class GroupController(BaseRestController):
    """ Controller to manage the groups
    """


and here is my (faulty) test (yes!! room1 exists !!)

    def test_header_allow_origin(self):
        """ test header 'Access-Control-Allow-Origin'
        """
        resp = self.app.get('/groups/room1', status=200)
        assert resp.headers['Access-Control-Allow-Origin']=='*'


what do I miss ???
thanks

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en.

Reply via email to