Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(4)  |  Derive(0)  |  Import(2)

src/p/t/ptahcms-0.5.1/ptahcms/tests/test_rest.py   ptahcms(Download)
    def test_rest_content(self):
        from ptahcms.rest import cmsContent
        ApplicationRoot = self._make_app()
        self.init_ptah()
 
        root = factory(request)
 
        info = cmsContent(request, 'test')
        self.assertEqual(info['__uri__'], root.__uri__)
 
        self.assertRaises(ptahcms.NotFound,
                          cmsContent, request, 'test', action='unknown')
 
        info = cmsContent(request, 'test', root.__uri__)
    def test_rest_content_default(self):
        from ptahcms.rest import cmsContent
        ApplicationRoot = self._make_app()
        self.init_ptah()
 
        root = factory(request)
 
        info = cmsContent(request)
        self.assertEqual(info['__uri__'], root.__uri__)