[Zope3-checkins] CVS: Zope3/src/zope/i18n/tests -
test_negotiator.py:1.7
Sidnei da Silva
sidnei at x3ng.com.br
Fri Feb 27 12:48:43 EST 2004
Update of /cvs-repository/Zope3/src/zope/i18n/tests
In directory cvs.zope.org:/tmp/cvs-serv1149/tests
Modified Files:
test_negotiator.py
Log Message:
Merge fixes for Negotiator handling of available languages check against preferred languages
=== Zope3/src/zope/i18n/tests/test_negotiator.py 1.6 => 1.7 ===
--- Zope3/src/zope/i18n/tests/test_negotiator.py:1.6 Sat Jan 10 06:02:37 2004
+++ Zope3/src/zope/i18n/tests/test_negotiator.py Fri Feb 27 12:48:43 2004
@@ -32,17 +32,19 @@
return self.langs
-class Test(PlacelessSetup, unittest.TestCase):
+class NegotiatorTest(PlacelessSetup, unittest.TestCase):
def setUp(self):
- super(Test, self).setUp()
+ super(NegotiatorTest, self).setUp()
self.Negotiator = Negotiator()
def test1(self):
_cases = (
(('en','de'), ('en','de','fr'), 'en'),
- (('en'), ('it','de','fr'), None)
+ (('en'), ('it','de','fr'), None),
+ (('pt-br','de'), ('pt_BR','de','fr'), 'pt_BR'),
+ (('pt-br','en'), ('pt','en','fr'), 'en'),
)
for user_pref_langs, obj_langs, expected in _cases:
@@ -53,7 +55,7 @@
def test_suite():
loader = unittest.TestLoader()
- return loader.loadTestsFromTestCase(Test)
+ return loader.loadTestsFromTestCase(NegotiatorTest)
if __name__ == '__main__':
More information about the Zope3-Checkins
mailing list