Back to index

plone3  3.1.7
Public Member Functions
plone.app.kss.tests.test_kss_attributes.TestContentsTabs Class Reference

List of all members.

Public Member Functions

def test_tab_ids
def test_ul_id

Detailed Description

Definition at line 123 of file test_kss_attributes.py.


Member Function Documentation

Definition at line 124 of file test_kss_attributes.py.

00124 
00125     def test_tab_ids():
00126         r"""
00127         Okay, we don't go straight away for the page but we actually
00128         do authenticate
00129         
00130             >>> self.browser.addHeader(
00131             ...    'Authorization', 'Basic %s:%s' % (self.user, self.password))
00132             >>> self.browser.open(self.page.absolute_url())
00133             >>> soup = self.BeautifulSoup(self.browser.contents)
00134         
00135         The content tabs must have li tags with special ids:
00136 
00137             >>> soup.find('li', dict(id='contentview-view')) is not None
00138             True
00139             >>> soup.find('li', dict(id='contentview-edit')) is not None
00140             True
00141             >>> soup.find('li', dict(id='contentview-local_roles')) is not None
00142             True
00143             >>> soup.find('li', dict(id='contentview-history')) is not None
00144             True
00145         """

Definition at line 146 of file test_kss_attributes.py.

00146 
00147     def test_ul_id():
00148         r"""
00149         We actually authenticate and we'll doing some tests about ul id (which it should be present)
00150         
00151             >>> self.browser.addHeader(
00152             ...    'Authorization', 'Basic %s:%s' % (self.user, self.password))
00153             >>> self.browser.open(self.page.absolute_url())
00154             >>> soup = self.BeautifulSoup(self.browser.contents)
00155         
00156         The content tabs must have li tags with special ids:
00157         Checking for the correct ul tag class
00158 
00159             >>> content_ul_tag = soup.find('ul', {'class':'contentViews'})
00160             >>> content_ul_tag is not None
00161             True 
00162           
00163         a tags inside of the li tags shouldn't have ids; li tags should have id attributes
00164 
00165             >>> [a.get('id') for a in content_ul_tag.findAll('a')]
00166             [None, None, None, None]
00167             >>> [li.get('id') for li in content_ul_tag.findAll('li')]
00168             [u'contentview-view', u'contentview-edit', u'contentview-local_roles', u'contentview-history']
00169 
        """

The documentation for this class was generated from the following file: