示例#1
0
    def test(self):
        from staticdocsplugin.staticdocs import normalize_path

        self.assertEquals(normalize_path('file.html'), 'file.html')
        self.assertEquals(normalize_path('/abs/file.html'), '/abs/file.html')
        self.assertEquals(normalize_path('./file.html'), 'file.html')
        self.assertEquals(normalize_path('/abs/./file.html'), '/abs/file.html')
示例#2
0
 def assertBadPath(self, path):
     from staticdocsplugin.staticdocs import normalize_path
     with self.assertRaises(HTTPBadRequest):
         normalize_path(path)
示例#3
0
 def assertNotFound(self, path):
     from staticdocsplugin.staticdocs import normalize_path
     with self.assertRaises(HTTPNotFound):
         normalize_path(path)