def makeDiscussions(self):
     for art_num in range(10):
         catalog_entry = Mock()
         catalog_entry.total_comments = art_num
         catalog_entry.getURL = lambda: "http://www.example.com/"
         discussion_item = Mock()
         catalog_entry.getObject = lambda: discussion_item
         discussion_item.getDecoratedTitle = lambda: u"öDecorated Title %i" % art_num
         yield catalog_entry
 def makeReviews(self):
     for art_num in range(10):
         cat = Mock()
         review = Mock()
         cat.getObject = lambda: review
         review.get_publication_title = lambda: "Mag Noö: %i" % (art_num / 2)
         review.getDecoratedTitle = lambda: review.get_publication_title().decode('utf-8') + "Decorated!"
         review.absolute_url = lambda: "http://www.example.com/"
         yield cat
 def makePresentations(self):
     content_types = ['Presentation Article Review', 'Presentation Collection', \
                          'Presentation Monograph', 'Presentation Online Resource']
     for art_num in range(10):
         catalog_entry = Mock()
         presentation = Mock()
         presentation.getDecoratedTitle = lambda:u"öDecorated title no: %i" % art_num
         catalog_entry.getObject = lambda: presentation
         catalog_entry.getURL = lambda: 'http://www.example.com/'
         catalog_entry.portal_type = content_types[art_num % len(content_types)]
         yield catalog_entry
 def makeIssues(self):
     magazines = [u'A Magazine', u'Another Magazine', u'A Third Magazine']
     for art_num in range(10):
         catalog_entry = Mock()
         pub = Mock()
         pub.Title = lambda: magazines[art_num % 3]
         iss = Mock()
         iss.Title = lambda: u'%02d' % (9 ** art_num  % 7)
         iss.getParentNode = lambda: pub
         obj = Mock()
         obj.getParentNode = lambda: iss
         catalog_entry.getObject = lambda: obj
         catalog_entry.Title = u'%01d' % art_num
         yield catalog_entry