Esempio n. 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)
Esempio n. 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)
Esempio n. 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.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')
Esempio n. 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.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")
Esempio n. 5
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')
Esempio n. 6
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')
Esempio n. 7
0
        name='discussion_feed'),
    url(_(r'^search/$'),
        SearchEntries(),
        name='entry_search_feed'),
    url(_(r'^tags/(?P<tag>[^/]+(?u))/$'),
        TagEntries(),
        name='tag_feed'),
    url(_(r'^authors/(?P<username>[.+-@\w]+)/$'),
        AuthorEntries(),
        name='author_feed'),
    url(_(r'^categories/(?P<path>[-\/\w]+)/$'),
        CategoryEntries(),
        name='category_feed'),
    url(_(r'^discussions/(?P<year>\d{4})/(?P<month>\d{2})/'
          '(?P<day>\d{2})/(?P<slug>[-\w]+)/$'),
        EntryDiscussions(),
        name='entry_discussion_feed'),
    url(_(r'^comments/(?P<year>\d{4})/(?P<month>\d{2})/'
          '(?P<day>\d{2})/(?P<slug>[-\w]+)/$'),
        EntryComments(),
        name='entry_comment_feed'),
    url(_(r'^pingbacks/(?P<year>\d{4})/(?P<month>\d{2})/'
        '(?P<day>\d{2})/(?P<slug>[-\w]+)/$'),
        EntryPingbacks(),
        name='entry_pingback_feed'),
    url(_(r'^trackbacks/(?P<year>\d{4})/(?P<month>\d{2})/'
        '(?P<day>\d{2})/(?P<slug>[-\w]+)/$'),
        EntryTrackbacks(),
        name='entry_trackback_feed'),
]