예제 #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)
예제 #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)
예제 #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))
예제 #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))
예제 #5
0
 def testBacklinks(self):
     newdoc = getattr(self.folder, titleToNormalizedId(self.title))
     backlinks = newdoc.getRefs(relationship=BACKLINK_RELATIONSHIP)
     self.failUnless(self.page1 in backlinks)
예제 #6
0
 def testDocAdded(self):
     self.failUnless(getattr(self.folder,
                             titleToNormalizedId(self.title), None))
예제 #7
0
 def testBacklinks(self):
     newdoc = getattr(self.folder, titleToNormalizedId(self.title))
     backlinks = newdoc.getRefs(relationship=BACKLINK_RELATIONSHIP)
     self.failUnless(self.page1 in backlinks)
예제 #8
0
 def testDocAdded(self):
     self.failUnless(
         getattr(self.folder, titleToNormalizedId(self.title), None))