[Zope3-checkins] CVS: Zope3/src/zope/publisher/tests - test_http.py:1.8

Barry Warsaw barry@wooz.org
Tue, 25 Mar 2003 10:13:57 -0500


Update of /cvs-repository/Zope3/src/zope/publisher/tests
In directory cvs.zope.org:/tmp/cvs-serv25680/src/zope/publisher/tests

Modified Files:
	test_http.py 
Log Message:
testRequestLocale(): locale is now a property on the request.



=== Zope3/src/zope/publisher/tests/test_http.py 1.7 => 1.8 ===
--- Zope3/src/zope/publisher/tests/test_http.py:1.7	Tue Mar 25 09:48:03 2003
+++ Zope3/src/zope/publisher/tests/test_http.py	Tue Mar 25 10:13:57 2003
@@ -119,7 +119,7 @@
         unless = self.failUnless
         for httplang in ('it', 'it-ch', 'it-CH', 'IT', 'IT-CH', 'IT-ch'):
             req = self._createRequest({'HTTP_ACCEPT_LANGUAGE': httplang})
-            locale = req.getLocale()
+            locale = req.locale
             unless(ILocale.isImplementedBy(locale))
             parts = httplang.split('-')
             lang = parts.pop(0).lower()
@@ -133,12 +133,11 @@
             eq(locale.id.variant, variant)
         # Now test for non-existant locale fallback
         req = self._createRequest({'HTTP_ACCEPT_LANGUAGE': 'xx'})
-        locale = req.getLocale()
+        locale = req.locale
         unless(ILocale.isImplementedBy(locale))
         eq(locale.id.language, None)
         eq(locale.id.country, None)
         eq(locale.id.variant, None)
-        
 
     def testCookies(self):
         cookies = {