Ejemplo n.º 1
0
 def test_dots(self):
     self.assertEqual(
         utils.canonicalize_path('./../this/./is/./only/../a/./test.html'),
         '/this/is/a/test.html')
     self.assertEqual(
         utils.canonicalize_path('../this/./is/./only/../a/./test.html'),
         '/this/is/a/test.html')
Ejemplo n.º 2
0
    def test_dots(self):
        self.assertEqual(
            utils.canonicalize_path('./../this/./is/./only/../a/./test.html'),
            '/this/is/a/test.html')
        self.assertEqual(
            utils.canonicalize_path('../this/./is/./only/../a/./test.html'),

            '/this/is/a/test.html')
Ejemplo n.º 3
0
 def test_non_ascii(self):
     self.assertEqual(utils.canonicalize_path(u'/te\xa0\u2013st'), '/test')
Ejemplo n.º 4
0
 def test_slashes(self):
     self.assertEqual(utils.canonicalize_path('//t//e///s/t'),
                      '/t/e/s/t')
Ejemplo n.º 5
0
 def test_lower(self):
     self.assertEqual(utils.canonicalize_path('/TEST'), '/test')
Ejemplo n.º 6
0
 def test_non_ascii(self):
     self.assertEqual(utils.canonicalize_path(u'/te\xa0\u2013st'), '/test')
Ejemplo n.º 7
0
 def test_slashes(self):
     self.assertEqual(utils.canonicalize_path('//t//e///s/t'), '/t/e/s/t')
Ejemplo n.º 8
0
 def test_lower(self):
     self.assertEqual(utils.canonicalize_path('/TEST'), '/test')