Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes
wicked.at.tests.wickedtestcase.WickedTestCase Class Reference
Collaboration diagram for wicked.at.tests.wickedtestcase.WickedTestCase:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def set_text
def afterSetUp
def getRenderedWickedField
def failIfAddLink
def failUnlessAddLink
def failIfWickedLink
def failUnlessWickedLink
def hasAddLink
def hasWickedLink

Public Attributes

 page1
 page2

Static Public Attributes

 layer = WickedSite
string setter = 'setBody'
tuple strip = staticmethod(strip)
 failIfMatch = failIfWickedLink
 failUnlessMatch = failUnlessWickedLink

Detailed Description

Definition at line 67 of file wickedtestcase.py.


Member Function Documentation

Definition at line 76 of file wickedtestcase.py.

00076 
00077     def afterSetUp(self):
00078         #self.loginAsPortalOwner()
00079         # add some pages
00080         id1 = titleToNormalizedId(TITLE1)
00081         id2 = titleToNormalizedId(TITLE2)
00082         try:
00083             self.page1 = makeContent(self.folder,id1,self.wicked_type,title=TITLE1)
00084         except :
00085             import sys, pdb
00086             pdb.post_mortem(sys.exc_info()[2])
00087         self.page2 = makeContent(self.folder,id2,self.wicked_type, title=TITLE2)

Here is the call graph for this function:

does wicked field text contain a wicked-generated add link? 

Definition at line 95 of file wickedtestcase.py.

00095 
00096     def failIfAddLink(self, doc):
00097         """ does wicked field text contain a wicked-generated add link? """
00098         # XXX make test stronger, support looking for specific links
00099         home_url= doc.absolute_url()
00100         text = self.getRenderedWickedField(doc)
00101         if home_url in text:
00102             self.fail("%s FOUND:\n\n %s" %(home_url, text))

Here is the call graph for this function:

Definition at line 111 of file wickedtestcase.py.

00111 
00112     def failIfWickedLink(self, doc, dest):
00113         dest = dest.absolute_url()
00114         text = self.getRenderedWickedField(doc)
00115         if dest in text:
00116             self.fail("%s FOUND:\n\n %s" %(dest, text))

Here is the call graph for this function:

Here is the caller graph for this function:

does wicked field text contain a wicked-generated add link? 

Definition at line 103 of file wickedtestcase.py.

00103 
00104     def failUnlessAddLink(self, doc):
00105         """ does wicked field text contain a wicked-generated add link? """
00106         # XXX make test stronger, support looking for specific links
00107         home_url= doc.absolute_url()
00108         text = self.getRenderedWickedField(doc)
00109         if not home_url in text:
00110             self.fail("%s NOT FOUND:\n\n %s" %(home_url, text))

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 119 of file wickedtestcase.py.

00119 
00120     def failUnlessWickedLink(self, doc, dest):
00121         dest = dest.absolute_url()
00122         text = self.getRenderedWickedField(doc)
00123         if not dest in text:
00124             self.fail("%s NOT FOUND:\n\n %s" %(dest, text))

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 90 of file wickedtestcase.py.

00090 
00091     def getRenderedWickedField(self, doc):
00092         fieldname = self.wicked_field
00093         text = doc.getField(fieldname).get(doc)
00094         return self.strip(text)

Here is the call graph for this function:

Here is the caller graph for this function:

does wicked field text contain a wicked-generated add link? 

Definition at line 127 of file wickedtestcase.py.

00127 
00128     def hasAddLink(self, doc):
00129         """ does wicked field text contain a wicked-generated add link? """
00130         # XXX make test stronger, support looking for specific links
00131         return doc.absolute_url() in self.getRenderedWickedField(doc)

Here is the call graph for this function:

does wicked field text contain a resolved wicked link to
the specified dest object?  

Definition at line 132 of file wickedtestcase.py.

00132 
00133     def hasWickedLink(self, doc, dest):
00134         """ does wicked field text contain a resolved wicked link to
00135         the specified dest object?  """
00136         # XXX make test stronger
00137         return dest.absolute_url() in self.getRenderedWickedField(doc)
00138 
00139 

Here is the call graph for this function:

def wicked.at.tests.wickedtestcase.WickedTestCase.set_text (   self,
  content,
  text,
  kw 
)

Definition at line 72 of file wickedtestcase.py.

00072 
00073     def set_text(self, content, text, **kw):
00074         setter = getattr(content, self.setter)
00075         setter(text, **kw)
    

Here is the caller graph for this function:


Member Data Documentation

Definition at line 117 of file wickedtestcase.py.

Definition at line 125 of file wickedtestcase.py.

Definition at line 69 of file wickedtestcase.py.

Definition at line 82 of file wickedtestcase.py.

Definition at line 86 of file wickedtestcase.py.

Definition at line 70 of file wickedtestcase.py.

Definition at line 88 of file wickedtestcase.py.


The documentation for this class was generated from the following file: