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

Stephan Richter srichter@cbu.edu
Tue, 25 Mar 2003 09:48:04 -0500


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

Modified Files:
	test_http.py 
Log Message:
Rworked the Locale-related interfaces to be much simpler and attribute 
oriented. Fixed implementation and tests. 

Note: There are fewer tests than before, since a lot of accessor and 
      mutator methods are missing.

Pairing at PyCon Sprint: Trevor and Stephan


=== Zope3/src/zope/publisher/tests/test_http.py 1.6 => 1.7 ===
--- Zope3/src/zope/publisher/tests/test_http.py:1.6	Tue Mar 25 09:33:25 2003
+++ Zope3/src/zope/publisher/tests/test_http.py	Tue Mar 25 09:48:03 2003
@@ -128,16 +128,16 @@
                 country = parts.pop(0).upper()
             if parts:
                 variant = parts.pop(0).upper()
-            eq(locale.getLocaleLanguageId(), lang)
-            eq(locale.getLocaleCountryId(), country)
-            eq(locale.getLocaleVariantId(), variant)
+            eq(locale.id.language, lang)
+            eq(locale.id.country, country)
+            eq(locale.id.variant, variant)
         # Now test for non-existant locale fallback
         req = self._createRequest({'HTTP_ACCEPT_LANGUAGE': 'xx'})
         locale = req.getLocale()
         unless(ILocale.isImplementedBy(locale))
-        eq(locale.getLocaleLanguageId(), None)
-        eq(locale.getLocaleCountryId(), None)
-        eq(locale.getLocaleVariantId(), None)
+        eq(locale.id.language, None)
+        eq(locale.id.country, None)
+        eq(locale.id.variant, None)
         
 
     def testCookies(self):