[Zope-Checkins] SVN: Zope/branches/2.13/src/Products/Five/browser/ Fix test errors for unicode id fixes.

Wichert Akkerman cvs-admin at zope.org
Wed Feb 20 15:23:10 UTC 2013


Log message for revision 129542:
  Fix test errors for unicode id fixes.

Changed:
  U   Zope/branches/2.13/src/Products/Five/browser/metaconfigure.py
  U   Zope/branches/2.13/src/Products/Five/browser/tests/pages.txt
  U   Zope/branches/2.13/src/Products/Five/browser/tests/test_menu.py

-=-
Modified: Zope/branches/2.13/src/Products/Five/browser/metaconfigure.py
===================================================================
--- Zope/branches/2.13/src/Products/Five/browser/metaconfigure.py	2013-02-20 15:19:31 UTC (rev 129541)
+++ Zope/branches/2.13/src/Products/Five/browser/metaconfigure.py	2013-02-20 15:23:10 UTC (rev 129542)
@@ -195,6 +195,8 @@
         (_context, name, for_, permission, layer, class_,
          allowed_interface, allowed_attributes) = self.args
 
+        name = str(name)  # De-unicode
+
         required = {}
 
         cdict = {}

Modified: Zope/branches/2.13/src/Products/Five/browser/tests/pages.txt
===================================================================
--- Zope/branches/2.13/src/Products/Five/browser/tests/pages.txt	2013-02-20 15:19:31 UTC (rev 129541)
+++ Zope/branches/2.13/src/Products/Five/browser/tests/pages.txt	2013-02-20 15:23:10 UTC (rev 129542)
@@ -87,15 +87,15 @@
   <Products.Five.metaclass.NewStyleClass ...>
   
 Both browser:view and browser:page are ILocation providers, so make sure they
-have a __name__ attribute:
+have a __name__ attribute with a str instance:
 
   >>> page = self.folder.unrestrictedTraverse('testoid/eagle.txt')
   >>> page.__name__
-  u'eagle.txt'
+  'eagle.txt'
 
   >>> view = self.folder.unrestrictedTraverse('testoid/named_view')
   >>> view.__name__
-  u'named_view'
+  'named_view'
 
 ZPT-based browser pages
 -----------------------

Modified: Zope/branches/2.13/src/Products/Five/browser/tests/test_menu.py
===================================================================
--- Zope/branches/2.13/src/Products/Five/browser/tests/test_menu.py	2013-02-20 15:19:31 UTC (rev 129541)
+++ Zope/branches/2.13/src/Products/Five/browser/tests/test_menu.py	2013-02-20 15:23:10 UTC (rev 129542)
@@ -49,7 +49,7 @@
       >>> menu.sort(lambda x, y: cmp(x['title'], y['title']))
       >>> from pprint import pprint
       >>> pprint(menu[0])
-      {'action': u'@@cockatiel_menu_public.html',
+      {'action': '@@cockatiel_menu_public.html',
        'description': u'',
        'extra': None,
        'icon': None,
@@ -100,7 +100,7 @@
 
       >>> menu.sort(lambda x, y: cmp(x['title'], y['title']))
       >>> pprint(menu[0])
-      {'action': u'@@cockatiel_menu_protected.html',
+      {'action': '@@cockatiel_menu_protected.html',
        'description': u'',
        'extra': None,
        'icon': None,
@@ -109,7 +109,7 @@
        'title': u'Page in a menu (protected)'}
 
       >>> pprint(menu[1])
-      {'action': u'@@cockatiel_menu_public.html',
+      {'action': '@@cockatiel_menu_public.html',
        'description': u'',
        'extra': None,
        'icon': None,



More information about the Zope-Checkins mailing list