Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def test_linkGetsCached
def test_cacheIsUsed

Public Attributes

 field
 filter
 wicked_ccm

Static Public Attributes

string wicked_type = 'IronicWiki'
string wicked_field = 'body'

Detailed Description

Definition at line 17 of file test_cache.py.


Member Function Documentation

sets the body of page1 to be a wicked link of the id of page2

Definition at line 21 of file test_cache.py.

00021 
00022     def afterSetUp(self):
00023         """
00024         sets the body of page1 to be a wicked link of the id of page2
00025         """
00026         super(TestLinkCache, self).afterSetUp()
00027         field = self.page1.getField(self.wicked_field)
00028         field.set(self.page1, "((%s))" % self.page2.Title())
00029         self.field = field
00030         self.filter = utils.getWicked(field, self.page1)
00031         self.wicked_ccm = self.filter.cache
00032         self.wicked_ccm.name=field.getName()
        

Definition at line 44 of file test_cache.py.

00044 
00045     def test_cacheIsUsed(self):
00046         field = self.field
00047         wicked_ccm = self.wicked_ccm
00048         pg2_id = self.page2.getId()
00049         wicked_ccm.set((pg2_id, IUID(self.page2)), [MARKER])
00050         value = self.getRenderedWickedField(self.page1)
00051         self.failUnless(MARKER['path'] in value)
00052         self.failIfWickedLink(self.page1, self.page2)
00053         

Here is the call graph for this function:

Definition at line 33 of file test_cache.py.

00033 
00034     def test_linkGetsCached(self):
00035         field = self.field
00036         wicked_ccm = self.wicked_ccm
00037         pg2_id = self.page2.getId()
00038         val = wicked_ccm.get(pg2_id)
00039         self.failUnless(val)
00040         data=dict(path='/plone/Members/test_user_1_/dmv-computer-has-died',
00041                   icon='plone/document_icon.gif')
00042         data['uid']=IUID(self.page2)
00043         self.failUnlessEqual(set(val[0].items()), set(data.items()))

Here is the call graph for this function:


Member Data Documentation

Definition at line 28 of file test_cache.py.

Definition at line 29 of file test_cache.py.

Definition at line 30 of file test_cache.py.

Definition at line 19 of file test_cache.py.

Definition at line 18 of file test_cache.py.


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