Ejemplo n.º 1
0
 def test_tag_entries(self):
     self.create_published_entry()
     feed = TagEntries()
     tag = Tag(name="tests")
     self.assertEquals(feed.get_object("request", "tests").name, "tests")
     self.assertEquals(len(feed.items("tests")), 1)
     self.assertEquals(feed.link(tag), "/tags/tests/")
     self.assertEquals(feed.get_title(tag), "Entries for the tag %s" % tag.name)
     self.assertEquals(feed.description(tag), "The latest entries for the tag %s" % tag.name)
Ejemplo n.º 2
0
 def test_tag_entries(self):
     self.create_published_entry()
     feed = TagEntries()
     tag = Tag(name='tests')
     self.assertEquals(feed.get_object('request', 'tests').name, 'tests')
     self.assertEquals(len(feed.items('tests')), 1)
     self.assertEquals(feed.link(tag), '/tags/tests/')
     self.assertEquals(feed.get_title(tag),
                       'Entries for the tag %s' % tag.name)
     self.assertEquals(feed.description(tag),
                       'The latest entries for the tag %s' % tag.name)
Ejemplo n.º 3
0
 def test_tag_entries(self):
     self.create_published_entry()
     feed = TagEntries()
     tag = Tag(name='tests')
     self.assertEquals(feed.get_object('request', 'tests').name, 'tests')
     self.assertEquals(len(feed.items('tests')), 1)
     self.assertEquals(feed.link(tag), '/tags/tests/')
     self.assertEquals(feed.get_title(tag),
                       'Entries for the tag %s' % tag.name)
     self.assertEquals(feed.description(tag),
                       'The latest entries for the tag %s' % tag.name)
Ejemplo n.º 4
0
 def test_tag_title_non_ascii(self):
     entry = self.create_published_entry()
     tag_unicode = smart_text('accentué')
     entry.tags = tag_unicode
     entry.save()
     feed = TagEntries()
     tag = Tag(name=tag_unicode)
     self.assertEqual(feed.get_title(tag),
                      'Entries for the tag %s' % tag_unicode)
     self.assertEqual(feed.description(tag),
                      'The last entries tagged with %s' % tag_unicode)
Ejemplo n.º 5
0
 def test_tag_title_non_ascii(self):
     entry = self.create_published_entry()
     tag_unicode = smart_text('accentué')
     entry.tags = tag_unicode
     entry.save()
     feed = TagEntries()
     tag = Tag(name=tag_unicode)
     self.assertEqual(feed.get_title(tag),
                      'Entries for the tag %s' % tag_unicode)
     self.assertEqual(feed.description(tag),
                      'The last entries tagged with %s' % tag_unicode)