Exemplo n.º 1
0
 def test_smartypants_conversion_on_title(self):
     post = self.factory.make_blog_post(title='Emdash -- Post')
     builder = ListPageBuilder(None)
     builder.add([post])
     self.assertEqual(
         '<li><a href="/a_source_file.html">Emdash &#8212; Post</a></li>',
         builder._blog_list)
Exemplo n.º 2
0
 def test_smartypants_conversion_on_title(self):
     post = self.factory.make_blog_post(title='Emdash -- Post')
     builder = ListPageBuilder(None)
     builder.add([post])
     self.assertEqual(
         '<li><a href="/a_source_file.html">Emdash &#8212; Post</a></li>',
         builder._blog_list)
Exemplo n.º 3
0
 def test_adds_posts_to_blog_list_html(self):
     post = self.factory.make_blog_post()
     another = self.factory.make_blog_post()
     another.title = 'Another Blog Post'
     builder = ListPageBuilder(None)
     builder.add([post, another])
     self.assertEqual(
         '<li><a href="/a_source_file.html">A Blog Post</a></li>\n'
         '<li><a href="/a_source_file.html">Another Blog Post</a></li>',
         builder._blog_list)
Exemplo n.º 4
0
 def test_adds_posts_to_blog_list_html(self):
     post = self.factory.make_blog_post()
     another = self.factory.make_blog_post()
     another.title = 'Another Blog Post'
     builder = ListPageBuilder(None)
     builder.add([post, another])
     self.assertEqual(
         '<li><a href="/a_source_file.html">A Blog Post</a></li>\n'
         '<li><a href="/a_source_file.html">Another Blog Post</a></li>',
         builder._blog_list)
Exemplo n.º 5
0
 def test_holds_posts(self):
     post = self.factory.make_blog_post()
     posts = [post]
     builder = ListPageBuilder(None)
     builder.add(posts)
     self.assertEqual(posts, builder._posts)
Exemplo n.º 6
0
 def test_holds_posts(self):
     post = self.factory.make_blog_post()
     posts = [post]
     builder = ListPageBuilder(None)
     builder.add(posts)
     self.assertEqual(posts, builder._posts)