[Checkins] SVN: zope.schema/trunk/src/zope/schema/tests/test_vocabulary.py Fixed tests to run under Python 2.4

Hanno Schlichting hannosch at hannosch.eu
Sun Sep 12 10:51:42 EDT 2010


Log message for revision 116329:
  Fixed tests to run under Python 2.4
  

Changed:
  U   zope.schema/trunk/src/zope/schema/tests/test_vocabulary.py

-=-
Modified: zope.schema/trunk/src/zope/schema/tests/test_vocabulary.py
===================================================================
--- zope.schema/trunk/src/zope/schema/tests/test_vocabulary.py	2010-09-12 14:48:14 UTC (rev 116328)
+++ zope.schema/trunk/src/zope/schema/tests/test_vocabulary.py	2010-09-12 14:51:42 UTC (rev 116329)
@@ -162,13 +162,13 @@
         try:
             vocabulary.SimpleVocabulary.fromValues([2, '2'])
         except ValueError, e:
-            self.assertEquals(e.message, "term tokens must be unique: '2'")
+            self.assertEquals(str(e), "term tokens must be unique: '2'")
 
     def test_nonunique_token_messages(self):
         try:
             vocabulary.SimpleVocabulary.fromItems([(0, 'one'), (1, 'one')])
         except ValueError, e:
-            self.assertEquals(e.message, "term values must be unique: 'one'")
+            self.assertEquals(str(e), "term values must be unique: 'one'")
 
     def test_overriding_createTerm(self):
         class MyTerm(object):



More information about the checkins mailing list