[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/ApplicationControl/tests - testApplicationControl.py:1.1.2.3
Christian Theune
ct@gocept.com
Thu, 18 Apr 2002 15:57:00 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/ApplicationControl/tests
In directory cvs.zope.org:/tmp/cvs-serv29575/lib/python/Zope/App/OFS/ApplicationControl/tests
Modified Files:
Tag: Zope-3x-branch
testApplicationControl.py
Log Message:
Fixed unit tests. They passed, but didn't test what they should (Equality of sets). Functional style is cool, but
failUnlessEqual is more appropriate.
=== Zope3/lib/python/Zope/App/OFS/ApplicationControl/tests/testApplicationControl.py 1.1.2.2 => 1.1.2.3 ===
def test_plugins(self):
test_appctrl = self._Test__new()
- assert_info = [ {'name':'foo', 'title':'I\'m a lumberjack'},
+ assert_info = ( {'name':'foo', 'title':'I\'m a lumberjack'},
{'name':'bar', 'title':'and i feel fine.'},
{'name':'nudges', 'title':'The nudge'},
- {'name':'dash', 'title':'The dash'}]
+ {'name':'dash', 'title':'The dash'} )
for info in assert_info:
test_appctrl.registerView(info['name'], info['title'])
-
- self.failUnless(min([info in assert_info for info in
- test_appctrl.getListOfViews()]))
+
+ test_info = test_appctrl.getListOfViews()
+ self.failUnlessEqual(assert_info, test_info)
def test_suite():