test/unittest_req.py
branchstable
changeset 4891 90203ec7b3e3
child 5421 8167de96c523
equal deleted inserted replaced
4890:b54255f82812 4891:90203ec7b3e3
       
     1 from logilab.common.testlib import TestCase, unittest_main
       
     2 from cubicweb.req import RequestSessionBase
       
     3 
       
     4 class RebuildURLTC(TestCase):
       
     5     def test(self):
       
     6         rebuild_url = RequestSessionBase(None).rebuild_url
       
     7         self.assertEquals(rebuild_url('http://logilab.fr?__message=pouet', __message='hop'),
       
     8                           'http://logilab.fr?__message=hop')
       
     9         self.assertEquals(rebuild_url('http://logilab.fr', __message='hop'),
       
    10                           'http://logilab.fr?__message=hop')
       
    11         self.assertEquals(rebuild_url('http://logilab.fr?vid=index', __message='hop'),
       
    12                           'http://logilab.fr?__message=hop&vid=index')
       
    13 
       
    14 
       
    15 if __name__ == '__main__':
       
    16     unittest_main()