[Zope3-checkins] SVN: Zope3/branches/jim-adapter/src/zope/app/component/browser/tools.txt Fixed tests that were too dependent on the order of

Jim Fulton jim at zope.com
Sun Apr 2 12:59:47 EDT 2006


Log message for revision 66312:
  Fixed tests that were too dependent on the order of 
  registrations returned by registeredUtilities.
  

Changed:
  U   Zope3/branches/jim-adapter/src/zope/app/component/browser/tools.txt

-=-
Modified: Zope3/branches/jim-adapter/src/zope/app/component/browser/tools.txt
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/component/browser/tools.txt	2006-04-02 16:59:44 UTC (rev 66311)
+++ Zope3/branches/jim-adapter/src/zope/app/component/browser/tools.txt	2006-04-02 16:59:47 UTC (rev 66312)
@@ -108,12 +108,8 @@
   >>> view.update()
   u'Tools successfully renamed.'
   >>> current_tools = view.getTools()
-  >>> current_tools[0]['instances'][0]['name']
-  'JohnDoe'
-  >>> current_tools[0]['instances'][1]['name']
-  'foo2'
-  >>> current_tools[0]['instances'][2]['name']
-  u''
+  >>> sorted([i['name'] for i in current_tools[0]['instances']])
+  [u'', 'JohnDoe', 'foo2']
 
   >>> request.form['old_names']=['JohnDoe', 'foo2']
   >>> request.form['new_names']=['foo1', 'Tres']
@@ -121,12 +117,8 @@
   >>> view.update()
   u'Tools successfully renamed.'
   >>> current_tools = view.getTools()
-  >>> current_tools[0]['instances'][0]['name']
-  'foo1'
-  >>> current_tools[0]['instances'][1]['name']
-  'Tres'
-  >>> current_tools[0]['instances'][2]['name']
-  u''
+  >>> sorted([i['name'] for i in current_tools[0]['instances']])
+  [u'', 'Tres', 'foo1']
 
 Deleting utilities
 ------------------



More information about the Zope3-Checkins mailing list