Example #1
0
    def test_frontend_robots_no_value(self):
        page = self._get_new_page()

        search = ISearch(page)
        search.robot_configuration = [u'follow']

        tile = MetaDataTile(page, self.request)
        result = tile()
        self.assertTrue('follow,noindex' in result)

        search = ISearch(page)
        search.robot_configuration = [u'index']

        tile = MetaDataTile(page, self.request)
        result = tile()
        self.assertTrue('index,nofollow' in result)
Example #2
0
    def test_robots_no_value(self):
        page = api.content.create(type='Document',
                                  title='Foobar',
                                  container=self.portal)

        search = ISearch(page)
        search.robot_configuration = [u'follow']

        tile = MetaDataTile(page, self.request)
        result = tile()
        self.assertTrue('follow,noindex' in result)

        search = ISearch(page)
        search.robot_configuration = [u'index']

        tile = MetaDataTile(page, self.request)
        result = tile()
        self.assertTrue('index,nofollow' in result)
Example #3
0
    def test_frontend_robots_values(self):
        page = self._get_new_page()

        search = ISearch(page)
        search.robot_configuration = [
            u'index', u'follow', u'noimageindex', u'noarchive', u'nosnippet'
        ]

        tile = MetaDataTile(page, self.request)
        result = tile()
        self.assertTrue(
            'index,follow,noimageindex,noarchive,nosnippet' in result)