示例#1
0
    def test_blog_items_results(self):
        """Test getting the blog items."""
        blog_items_en = self.view_en.blog_items()
        set_language('de')
        blog_items_de = self.view_de.blog_items()

        self.assertEquals([item.getId() for item in blog_items_en],
                          ['blog-entry-1', 'blog-entry-2'])
        self.assertEquals([item.getId() for item in blog_items_de],
                          ['blog-entry-1-de', 'blog-entry-2'])
示例#2
0
 def test_blog_intro(self):
     """Test getting the blog intro from the blog subfolder front page."""
     self.assertEquals(
         self.view_en.blog_intro(),
         '<p>OSH Blog text</p>'
     )
     set_language('de')
     self.assertEquals(
         self.view_de.blog_intro(),
         '<p>OSH Blog text (de)</p>'
     )
示例#3
0
    def test__get_blog_items_results(self):
        """Test getting the blog items."""
        blog_items_en = self.view_en._get_blog_items(
            folder=self.director_corner_en['blog'])
        set_language('de')
        blog_items_de = self.view_de._get_blog_items(
            folder=self.director_corner_de['blog'])

        self.assertEquals([item.getId() for item in blog_items_en],
                          ['blog-entry-1', 'blog-entry-2'])
        self.assertEquals([item.getId() for item in blog_items_de],
                          ['blog-entry-1-de', 'blog-entry-2'])
示例#4
0
    def test_blog_items_results(self):
        """Test getting the blog items."""
        blog_items_en = self.view_en.blog_items()
        set_language('de')
        blog_items_de = self.view_de.blog_items()

        self.assertEquals(
            [item.getId() for item in blog_items_en],
            ['blog-entry-1', 'blog-entry-2']
        )
        self.assertEquals(
            [item.getId() for item in blog_items_de],
            ['blog-entry-1-de', 'blog-entry-2']
        )
示例#5
0
    def test__get_blog_items_results(self):
        """Test getting the blog items."""
        blog_items_en = self.view_en._get_blog_items(
            folder=self.director_corner_en['blog'])
        set_language('de')
        blog_items_de = self.view_de._get_blog_items(
            folder=self.director_corner_de['blog'])

        self.assertEquals(
            [item.getId() for item in blog_items_en],
            ['blog-entry-1', 'blog-entry-2']
        )
        self.assertEquals(
            [item.getId() for item in blog_items_de],
            ['blog-entry-1-de', 'blog-entry-2']
        )
 def setUp(self):
     self.portal = self.layer['portal']
     self.view = self.portal.restrictedTraverse('@@translation-helper')
     self._create_content()
     set_language('de')
示例#7
0
 def test_blog_intro(self):
     """Test getting the blog intro from the blog subfolder front page."""
     self.assertEquals(self.view_en.blog_intro(), '<p>OSH Blog text</p>')
     set_language('de')
     self.assertEquals(self.view_de.blog_intro(),
                       '<p>OSH Blog text (de)</p>')
示例#8
0
 def setUp(self):
     self.portal = self.layer['portal']
     self.view = self.portal.restrictedTraverse('@@translation-helper')
     self._create_content()
     set_language('de')