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