Example #1
0
 def test_entry_comments(self):
     entry = self.create_published_entry()
     comments = self.create_discussions(entry)
     feed = EntryComments()
     self.assertEquals(list(feed.items(entry)), [comments[0]])
     self.assertEquals(feed.item_link(comments[0]),
                       '/comments/cr/%i/1/#comment_1' % self.entry_ct_id)
Example #2
0
 def test_entry_comments(self):
     entry = self.create_published_entry()
     comments = self.create_discussions(entry)
     feed = EntryComments()
     self.assertEquals(list(feed.items(entry)), [comments[0]])
     self.assertEquals(feed.item_link(comments[0]),
                       '/comments/cr/%i/1/#comment_1' % self.entry_ct_id)
Example #3
0
 def test_entry_comments(self):
     entry = self.create_published_entry()
     comments = self.create_discussions(entry)
     feed = EntryComments()
     self.assertEquals(list(feed.items(entry)), [comments[0]])
     self.assertEquals(feed.item_link(comments[0]), "/comments/cr/%i/1/#comment_1" % self.entry_ct_id)
     self.assertEquals(feed.get_title(entry), "Comments on %s" % entry.title)
     self.assertEquals(feed.description(entry), "The latest comments for the entry %s" % entry.title)
     self.assertEquals(
         feed.item_enclosure_url(comments[0]),
         "http://www.gravatar.com/avatar/e64c7d89f26b" "d1972efa854d13d7dd61.jpg?s=80&r=g",
     )
     self.assertEquals(feed.item_enclosure_length(entry), "100000")
     self.assertEquals(feed.item_enclosure_mime_type(entry), "image/jpeg")
Example #4
0
 def test_entry_comments(self):
     entry = self.create_published_entry()
     comments = self.create_discussions(entry)
     feed = EntryComments()
     self.assertEquals(list(feed.items(entry)), [comments[0]])
     self.assertEquals(feed.item_link(comments[0]),
                       '/comments/cr/%i/1/#comment_1' % self.entry_ct_id)
     self.assertEquals(feed.title(entry),
                       _('Comments on %s') % entry.title)
     self.assertEquals(feed.description(entry),
                       _('The latest comments for the entry %s') % entry.title)
     self.assertEquals(feed.item_enclosure_url(comments[0]),
                       'http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61.jpg?s=80&r=g')
     self.assertEquals(feed.item_enclosure_length(entry), '100000')
     self.assertEquals(feed.item_enclosure_mime_type(entry), 'image/jpeg')
Example #5
0
 def test_entry_comments(self):
     entry = self.create_published_entry()
     comments = self.create_discussions(entry)
     feed = EntryComments()
     self.assertEquals(list(feed.items(entry)), [comments[0]])
     self.assertEquals(feed.item_link(comments[0]),
                       '/comments/cr/%i/1/#comment-1-by-admin' %
                       self.entry_ct_id)
     self.assertEquals(feed.get_title(entry),
                       'Comments on %s' % entry.title)
     self.assertEquals(
         feed.description(entry),
         'The latest comments for the entry %s' % entry.title)
     self.assertEquals(
         feed.item_enclosure_url(comments[0]),
         'http://www.gravatar.com/avatar/e64c7d89f26b'
         'd1972efa854d13d7dd61?s=80&r=g')
     self.assertEquals(feed.item_enclosure_length(entry), '100000')
     self.assertEquals(feed.item_enclosure_mime_type(entry), 'image/jpeg')
Example #6
0
 def test_entry_comments(self):
     entry = self.create_published_entry()
     comments = self.create_discussions(entry)
     feed = EntryComments()
     self.assertEqual(list(feed.items(entry)), [comments[0]])
     self.assertEqual(feed.item_link(comments[0]),
                      '/comments/cr/%i/%i/#comment-%i-by-admin' %
                      (self.entry_ct_id, entry.pk, comments[0].pk))
     self.assertEqual(feed.get_title(entry),
                      'Comments on %s' % entry.title)
     self.assertEqual(
         feed.description(entry),
         'The last comments on the entry %s' % entry.title)
     self.assertTrue(urlEqual(
         feed.item_enclosure_url(comments[0]),
         'http://www.gravatar.com/avatar/e64c7d89f26b'
         'd1972efa854d13d7dd61?s=80&r=g'))
     self.assertEqual(feed.item_enclosure_length(entry), '100000')
     self.assertEqual(feed.item_enclosure_mime_type(entry), 'image/jpeg')