Hello there! I don't doubt "room1" exists, but have you checked to see what response you are getting? And if so, what is it? Could you post it?
Right now, I'm not sure what else it could be other than something similar to a typo occurring. So, as much as I hate to ask it, could you post the actual contents of the response from the test? Doing this line will show it to you: assert resp.headers['Access-Control-Allow-Origin']=='*', resp On Tue, Mar 29, 2011 at 5:58 PM, NiL <[email protected]> wrote: > 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. > > -- Michael J. Pedersen My IM IDs: Jabber/[email protected], ICQ/103345809, AIM/pedermj022171 Yahoo/pedermj2002, MSN/[email protected] ---------- All humans fail, in both great and small ways we fail continually. Machines fail too. Computers are machines that are managed by humans, the fallout from failure can be spectacular. Your responsibility is to deal with failure, to anticipate it and to eliminate it as far as is humanly and economically wise to achieve. Are your actions part of the problem or part of the solution? -- 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.

