Hello,

How do I set an authentication cookie with WebTest for unittesting?

import unittest2 as unittest
from webtest import TestApp

from sisfest import main


class MyTestCase(unittest.TestCase):

    def setUp(self):
        self.app = TestApp(main({}))

    def test_view_permission(self):
        self.app.get('/admin_only_url', status=200)
        # this will always return status=403  

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.

Reply via email to