Ejemplo n.º 1
0
 def test_author_entries(self):
     self.create_published_entry()
     feed = AuthorEntries()
     self.assertEquals(feed.get_object("request", "admin"), self.author)
     self.assertEquals(len(feed.items(self.author)), 1)
     self.assertEquals(feed.link(self.author), "/authors/admin/")
     self.assertEquals(feed.get_title(self.author), "Entries for author %s" % self.author.username)
     self.assertEquals(feed.description(self.author), "The latest entries by %s" % self.author.username)
Ejemplo n.º 2
0
 def test_author_entries(self):
     self.create_published_entry()
     feed = AuthorEntries()
     self.assertEquals(feed.get_object('request', 'admin'), self.author)
     self.assertEquals(len(feed.items(self.author)), 1)
     self.assertEquals(feed.link(self.author), '/authors/admin/')
     self.assertEquals(feed.title(self.author),
                       _('Entries for author %s') % self.author.username)
     self.assertEquals(feed.description(self.author),
                       _('The latest entries by %s') % self.author.username)
Ejemplo n.º 3
0
 def test_author_entries(self):
     self.create_published_entry()
     feed = AuthorEntries()
     self.assertEquals(feed.get_object('request', 'admin'), self.author)
     self.assertEquals(len(feed.items(self.author)), 1)
     self.assertEquals(feed.link(self.author), '/authors/admin/')
     self.assertEquals(feed.get_title(self.author),
                       _('Entries for author %s') % self.author.username)
     self.assertEquals(feed.description(self.author),
                       _('The latest entries by %s') % self.author.username)
Ejemplo n.º 4
0
 def test_author_entries(self):
     self.create_published_entry()
     feed = AuthorEntries()
     self.assertEqual(feed.get_object('request', 'admin'), self.author)
     self.assertEqual(len(feed.items(self.author)), 1)
     self.assertEqual(feed.link(self.author), '/authors/admin/')
     self.assertEqual(feed.get_title(self.author),
                      'Entries for the author %s' % self.author.__str__())
     self.assertEqual(feed.description(self.author),
                      'The last entries by %s' % self.author.__str__())
Ejemplo n.º 5
0
 def test_author_title_non_ascii(self):
     self.author.first_name = smart_text('Léon')
     self.author.last_name = 'Bloom'
     self.author.save()
     self.create_published_entry()
     feed = AuthorEntries()
     self.assertEqual(feed.get_title(self.author),
                      smart_text('Entries for author %s' %
                                 self.author.__str__()))
     self.assertEqual(feed.description(self.author),
                      smart_text('The latest entries by %s' %
                                 self.author.__str__()))
Ejemplo n.º 6
0
 def test_author_title_non_ascii(self):
     self.author.first_name = smart_text('Léon')
     self.author.last_name = 'Bloom'
     self.author.save()
     self.create_published_entry()
     feed = AuthorEntries()
     self.assertEqual(feed.get_title(self.author),
                      smart_text('Entries for the author %s' %
                                 self.author.__str__()))
     self.assertEqual(feed.description(self.author),
                      smart_text('The last entries by %s' %
                                 self.author.__str__()))
Ejemplo n.º 7
0
 def test_author_entries(self):
     self.create_published_entry()
     feed = AuthorEntries()
     self.assertEqual(feed.get_object('request', 'admin'), self.author)
     self.assertEqual(len(feed.items(self.author)), 1)
     self.assertEqual(feed.link(self.author), '/authors/admin/')
     self.assertEqual(feed.get_title(self.author),
                      'Entries for the author %s' %
                      self.author.__str__())
     self.assertEqual(feed.description(self.author),
                      'The last entries by %s' %
                      self.author.__str__())