Beispiel #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')
Beispiel #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')
Beispiel #3
0
 def test_non_ascii(self):
     self.assertEqual(utils.canonicalize_path(u'/te\xa0\u2013st'), '/test')
Beispiel #4
0
 def test_slashes(self):
     self.assertEqual(utils.canonicalize_path('//t//e///s/t'),
                      '/t/e/s/t')
Beispiel #5
0
 def test_lower(self):
     self.assertEqual(utils.canonicalize_path('/TEST'), '/test')
Beispiel #6
0
 def test_non_ascii(self):
     self.assertEqual(utils.canonicalize_path(u'/te\xa0\u2013st'), '/test')
Beispiel #7
0
 def test_slashes(self):
     self.assertEqual(utils.canonicalize_path('//t//e///s/t'), '/t/e/s/t')
Beispiel #8
0
 def test_lower(self):
     self.assertEqual(utils.canonicalize_path('/TEST'), '/test')