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