Exemple #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')
Exemple #2
0
 def assertBadPath(self, path):
     from staticdocsplugin.staticdocs import normalize_path
     with self.assertRaises(HTTPBadRequest):
         normalize_path(path)
Exemple #3
0
 def assertNotFound(self, path):
     from staticdocsplugin.staticdocs import normalize_path
     with self.assertRaises(HTTPNotFound):
         normalize_path(path)