Example #1
0
 def afterSetUp(self):
     #self.loginAsPortalOwner()
     # add some pages
     id1 = titleToNormalizedId(TITLE1)
     id2 = titleToNormalizedId(TITLE2)
     self.page1 = makeContent(self.folder,id1,self.wicked_type,title=TITLE1)
     self.page2 = makeContent(self.folder,id2,self.wicked_type, title=TITLE2)
Example #2
0
 def afterSetUp(self):
     #self.loginAsPortalOwner()
     # add some pages
     id1 = titleToNormalizedId(TITLE1)
     id2 = titleToNormalizedId(TITLE2)
     self.page1 = makeContent(self.folder,
                              id1,
                              self.wicked_type,
                              title=TITLE1)
     self.page2 = makeContent(self.folder,
                              id2,
                              self.wicked_type,
                              title=TITLE2)
Example #3
0
 def clickCreate(self, page, title):
     """
     simulates browser interaction
     """
     addview = page.restrictedTraverse('@@wickedadd')
     addview.add_content(title=title, section=self.wicked_field, type_name=self.wicked_type)
     self.set_text(page, "((%s))" %title ) #wha?
     return getattr(self.folder, titleToNormalizedId(title))
Example #4
0
 def clickCreate(self, page, title):
     """
     simulates browser interaction
     """
     addview = page.restrictedTraverse('@@wickedadd')
     addview.add_content(title=title,
                         section=self.wicked_field,
                         type_name=self.wicked_type)
     self.set_text(page, "((%s))" % title)  #wha?
     return getattr(self.folder, titleToNormalizedId(title))
Example #5
0
 def testBacklinks(self):
     newdoc = getattr(self.folder, titleToNormalizedId(self.title))
     backlinks = newdoc.getRefs(relationship=BACKLINK_RELATIONSHIP)
     self.failUnless(self.page1 in backlinks)
Example #6
0
 def testDocAdded(self):
     self.failUnless(getattr(self.folder,
                             titleToNormalizedId(self.title), None))
Example #7
0
 def testBacklinks(self):
     newdoc = getattr(self.folder, titleToNormalizedId(self.title))
     backlinks = newdoc.getRefs(relationship=BACKLINK_RELATIONSHIP)
     self.failUnless(self.page1 in backlinks)
Example #8
0
 def testDocAdded(self):
     self.failUnless(
         getattr(self.folder, titleToNormalizedId(self.title), None))