Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
PloneLanguageTool.tests.test_negotiation.TestDefaultLanguageNegotiation Class Reference
Inheritance diagram for PloneLanguageTool.tests.test_negotiation.TestDefaultLanguageNegotiation:
Inheritance graph
[legend]
Collaboration diagram for PloneLanguageTool.tests.test_negotiation.TestDefaultLanguageNegotiation:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def testLanguageNegotiation
def afterSetUp

Public Attributes

 basic_auth
 portal_path
 tool

Detailed Description

Definition at line 21 of file test_negotiation.py.


Member Function Documentation

Reimplemented in PloneLanguageTool.tests.test_negotiation.TestCcTLDLanguageNegotiation, PloneLanguageTool.tests.test_negotiation.TestCombinedLanguageNegotiation, and PloneLanguageTool.tests.test_negotiation.TestNoCombinedLanguageNegotiation.

Definition at line 15 of file test_negotiation.py.

00015 
00016     def afterSetUp(self):
00017         self.basic_auth = '%s:%s' % (default_user, default_password)
00018         self.portal_path = self.portal.absolute_url(1)
00019         self.tool = self.portal[LanguageTool.id]
00020 

Definition at line 23 of file test_negotiation.py.

00023 
00024     def testLanguageNegotiation(self):
00025         response = self.publish(self.portal_path, self.basic_auth,
00026                                 env={'HTTP_ACCEPT_LANGUAGE': 'pt'})
00027 
00028         self.assertEquals(response.getStatus(), 200)
00029         # Once PLT is installed only English is allowed as a language
00030         self.assertEquals(response.headers['content-language'], 'en')
00031 


Member Data Documentation

Definition at line 16 of file test_negotiation.py.

Definition at line 17 of file test_negotiation.py.

Definition at line 18 of file test_negotiation.py.


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