Esempio n. 1
0
 def test_path_redirect(self):
     url = 'http://www.example.com/foo/bar'
     self.assertEqual(BaseView.sanitize_url(url), '/foo/bar')
Esempio n. 2
0
 def test_path_redirect(self):
     url = 'http://www.example.com/foo/bar'
     self.assertEqual(BaseView.sanitize_url(url), '/foo/bar')
Esempio n. 3
0
 def test_redirect_with_extra_slash_in_scheme(self):
     unsafe_url = 'http:///www.example.com/'
     self.assertEqual(BaseView.sanitize_url(unsafe_url), '/')
Esempio n. 4
0
 def test_redirect_with_extra_slash_in_scheme(self):
     unsafe_url = 'http:///www.example.com/'
     self.assertEqual(BaseView.sanitize_url(unsafe_url), '/')