def test_add_new_page_container(self):
        pageName = 'Dummy'
        pageTemplate = 'PageService.PageTemplates.PageContainer'
        pageParentKey = '0'

        message = Pages.addNewPage(pageName, pageTemplate, pageParentKey)

        page = Pages.getByKey(message['pageKey'])

        self.assertEqual(page.name, pageName)
    def test_add_new_page_container(self):
        pageName = 'Dummy'
        pageTemplate = 'PageService.PageTemplates.PageContainer'
        pageParentKey = '0'

        message = Pages.addNewPage(pageName, pageTemplate, pageParentKey)

        page = Pages.getByKey(message['pageKey'])

        self.assertEqual(page.name, pageName)
    def test_add_new_page_no_page_parent(self):
        message = Pages.addNewPage('dummy', '1', '-1')

        self.assertEquals(message['status'], '-1')
Beispiel #4
0
 def editViewAddNewPage(self, request):
     return Pages.addNewPage(request.get('page_name'),
                             request.get('page_template'),
                             request.get('page_parent_key'))
    def test_add_new_page_no_page_parent(self):
        message = Pages.addNewPage('dummy', '1', '-1')

        self.assertEquals(message['status'], '-1')
 def editViewAddNewPage(self, request):
     return Pages.addNewPage(request.get('page_name'), request.get('page_template'), request.get('page_parent_key'))