Exemplo n.º 1
0
Arquivo: app.py Projeto: jelmer/wikkid
 def _get_view(self, request, path):
     """Get the view for the path specified."""
     resource_path, action = parse_url(path)
     model = self.resource_factory.get_resource_at_path(resource_path)
     return get_view(model, action, request, self.execution_context)
Exemplo n.º 2
0
 def test_path_view(self):
     path, view = parse_url('/some/path/+view')
     self.assertEqual('/some/path', path)
     self.assertEqual('view', view)
Exemplo n.º 3
0
 def test_root_view(self):
     path, view = parse_url('/+listing')
     self.assertEqual('/', path)
     self.assertEqual('listing', view)
Exemplo n.º 4
0
 def test_path(self):
     path, view = parse_url('/some/path')
     self.assertEqual('/some/path', path)
     self.assertIs(None, view)
Exemplo n.º 5
0
 def test_root(self):
     path, view = parse_url('/')
     self.assertEqual('/', path)
     self.assertIs(None, view)