Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
plone.app.layout.globals.tests.test_portal.TestPortalStateView Class Reference
Inheritance diagram for plone.app.layout.globals.tests.test_portal.TestPortalStateView:
Inheritance graph
[legend]
Collaboration diagram for plone.app.layout.globals.tests.test_portal.TestPortalStateView:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def afterSetUp
def test_portal
def test_portal_title
def test_portal_url
def test_navigation_root_path
def test_navigation_root_url
def test_default_language
def test_language
def test_locale
def test_is_rtl
def test_member
def test_anonymous
def test_friendly_types

Public Attributes

 view

Detailed Description

Ensure that the basic redirector setup is successful.

Definition at line 7 of file test_portal.py.


Member Function Documentation

Definition at line 11 of file test_portal.py.

00011 
00012     def afterSetUp(self):
00013         self.view = self.folder.restrictedTraverse('@@plone_portal_state')
    

Definition at line 54 of file test_portal.py.

00054 
00055     def test_anonymous(self):
00056         self.assertEquals(self.view.anonymous(), False)
00057         self.logout()
00058         del self.app.REQUEST.__annotations__
00059         self.assertEquals(self.view.anonymous(), True)
        

Here is the call graph for this function:

Definition at line 31 of file test_portal.py.

00031 
00032     def test_default_language(self):
00033         self.portal.portal_properties.site_properties.default_language = 'no'
00034         self.assertEquals(self.view.default_language(), 'no')
        

Definition at line 60 of file test_portal.py.

00060 
00061     def test_friendly_types(self):
00062         self.portal.portal_properties.site_properties.types_not_searched = ('Document',)
00063         self.failIf('Document' in self.view.friendly_types())

Definition at line 44 of file test_portal.py.

00044 
00045     def test_is_rtl(self):
00046         self.app.REQUEST.set('HTTP_ACCEPT_LANGUAGE', 'no')
00047         self.assertEquals(self.view.is_rtl(), False)
00048         del self.app.REQUEST.__annotations__
00049         self.app.REQUEST.set('HTTP_ACCEPT_LANGUAGE', 'he')
00050         self.assertEquals(self.view.is_rtl(), True)
        

Definition at line 35 of file test_portal.py.

00035 
00036     def test_language(self):
00037         self.app.REQUEST.set('LANGUAGE', 'no')
00038         self.assertEquals(self.view.language(), 'no')
        

Definition at line 39 of file test_portal.py.

00039 
00040     def test_locale(self):
00041         self.app.REQUEST.set('HTTP_ACCEPT_LANGUAGE', 'no')
00042         no = locales.getLocale('no', None, None)
00043         self.assertEquals(self.view.locale(), no)
        

Definition at line 51 of file test_portal.py.

00051 
00052     def test_member(self):
00053         self.assertEquals(self.view.member(), self.portal.portal_membership.getAuthenticatedMember())
        

Definition at line 24 of file test_portal.py.

00024 
00025     def test_navigation_root_path(self):
00026         self.assertEquals(self.view.navigation_root_path(), getNavigationRoot(self.folder))
        

Here is the call graph for this function:

Definition at line 27 of file test_portal.py.

00027 
00028     def test_navigation_root_url(self):
00029         url = self.app.REQUEST.physicalPathToURL(getNavigationRoot(self.folder))
00030         self.assertEquals(self.view.navigation_root_url(), url)

Here is the call graph for this function:

Definition at line 14 of file test_portal.py.

00014 
00015     def test_portal(self):
00016         self.assertEquals(self.view.portal(), self.portal)
        

Here is the call graph for this function:

Definition at line 17 of file test_portal.py.

00017 
00018     def test_portal_title(self):
00019         self.portal.title = 'My title'
00020         self.assertEquals(self.view.portal_title(), 'My title')
        

Definition at line 21 of file test_portal.py.

00021 
00022     def test_portal_url(self):
00023         self.assertEquals(self.view.portal_url(), self.portal.absolute_url())
                       

Member Data Documentation

Definition at line 12 of file test_portal.py.


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