예제 #1
0
 def test_entry_discussions(self):
     entry = self.create_published_entry()
     comments = self.create_discussions(entry)
     feed = EntryDiscussions()
     self.assertEquals(feed.get_object('request', entry.slug), entry)
     self.assertEquals(feed.link(entry), '/2010/01/01/my-test-entry/')
     self.assertEquals(len(feed.items(entry)), 3)
     self.assertEquals(feed.item_pubdate(comments[0]), comments[0].submit_date)
     self.assertEquals(feed.item_link(comments[0]),
                       '/comments/cr/%i/1/#c1' % self.entry_ct_id)
     self.assertEquals(feed.item_author_name(comments[0]), 'admin')
     self.assertEquals(feed.item_author_email(comments[0]), '*****@*****.**')
     self.assertEquals(feed.item_author_link(comments[0]), '')
예제 #2
0
 def test_entry_discussions(self):
     entry = self.create_published_entry()
     comments = self.create_discussions(entry)
     feed = EntryDiscussions()
     self.assertEquals(feed.get_object("request", 2010, 1, 1, entry.slug), entry)
     self.assertEquals(feed.link(entry), "/2010/01/01/my-test-entry/")
     self.assertEquals(len(feed.items(entry)), 3)
     self.assertEquals(feed.item_pubdate(comments[0]), comments[0].submit_date)
     self.assertEquals(feed.item_link(comments[0]), "/comments/cr/%i/1/#c1" % self.entry_ct_id)
     self.assertEquals(feed.item_author_name(comments[0]), "admin")
     self.assertEquals(feed.item_author_email(comments[0]), "*****@*****.**")
     self.assertEquals(feed.item_author_link(comments[0]), "")
     self.assertEquals(feed.get_title(entry), "Discussions on %s" % entry.title)
     self.assertEquals(feed.description(entry), "The latest discussions for the entry %s" % entry.title)
예제 #3
0
 def test_entry_discussions(self):
     entry = self.create_published_entry()
     comments = self.create_discussions(entry)
     feed = EntryDiscussions()
     self.assertEquals(feed.get_object('request', entry.slug), entry)
     self.assertEquals(feed.link(entry), '/2010/01/01/my-test-entry/')
     self.assertEquals(len(feed.items(entry)), 3)
     self.assertEquals(feed.item_pubdate(comments[0]),
                       comments[0].submit_date)
     self.assertEquals(feed.item_link(comments[0]),
                       '/comments/cr/%i/1/#c1' % self.entry_ct_id)
     self.assertEquals(feed.item_author_name(comments[0]), 'admin')
     self.assertEquals(feed.item_author_email(comments[0]),
                       '*****@*****.**')
     self.assertEquals(feed.item_author_link(comments[0]), '')
예제 #4
0
 def test_entry_discussions(self):
     entry = self.create_published_entry()
     comments = self.create_discussions(entry)
     feed = EntryDiscussions()
     self.assertEquals(feed.get_object(
         'request', 2010, 1, 1, entry.slug), entry)
     self.assertEquals(feed.link(entry), '/2010/01/01/my-test-entry/')
     self.assertEquals(len(feed.items(entry)), 3)
     self.assertEquals(feed.item_pubdate(comments[0]),
                       comments[0].submit_date)
     self.assertEquals(feed.item_link(comments[0]),
                       '/comments/cr/%i/1/#c1' % self.entry_ct_id)
     self.assertEquals(feed.item_author_name(comments[0]),
                       self.author.__unicode__())
     self.assertEquals(feed.item_author_email(comments[0]),
                       '*****@*****.**')
     self.assertEquals(feed.item_author_link(comments[0]), '')
     self.assertEquals(feed.get_title(entry),
                       'Discussions on %s' % entry.title)
     self.assertEquals(
         feed.description(entry),
         'The latest discussions for the entry %s' % entry.title)
예제 #5
0
 def test_entry_discussions(self):
     entry = self.create_published_entry()
     comments = self.create_discussions(entry)
     feed = EntryDiscussions()
     self.assertEquals(feed.get_object('request', 2010, 1, 1, entry.slug),
                       entry)
     self.assertEquals(feed.link(entry), '/2010/01/01/my-test-entry/')
     self.assertEquals(len(feed.items(entry)), 3)
     self.assertEquals(feed.item_pubdate(comments[0]),
                       comments[0].submit_date)
     self.assertEquals(feed.item_link(comments[0]),
                       '/comments/cr/%i/1/#c1' % self.entry_ct_id)
     self.assertEquals(feed.item_author_name(comments[0]),
                       self.author.__unicode__())
     self.assertEquals(feed.item_author_email(comments[0]),
                       '*****@*****.**')
     self.assertEquals(feed.item_author_link(comments[0]), '')
     self.assertEquals(feed.get_title(entry),
                       'Discussions on %s' % entry.title)
     self.assertEquals(
         feed.description(entry),
         'The latest discussions for the entry %s' % entry.title)