[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/site/browser/
Extended a functional test to ensure that utilities added via
"Tools"
Stephan Richter
srichter at cosmos.phy.tufts.edu
Wed Jul 7 17:37:53 EDT 2004
Log message for revision 26191:
Extended a functional test to ensure that utilities added via "Tools"
interface have parents and names.
Fix 211.
-=-
Modified: Zope3/trunk/src/zope/app/site/browser/ftests/test_utilitytools.py
===================================================================
--- Zope3/trunk/src/zope/app/site/browser/ftests/test_utilitytools.py 2004-07-07 21:15:13 UTC (rev 26190)
+++ Zope3/trunk/src/zope/app/site/browser/ftests/test_utilitytools.py 2004-07-07 21:37:53 UTC (rev 26191)
@@ -60,6 +60,12 @@
tools = zapi.traverse(root, '/++etc++site/tools')
self.assert_('zope' in tools.keys())
+ # Make sure that the new utility has a parent and a name
+ zope = zapi.getUtility(ITranslationDomain, 'zope', context=tools)
+ self.assertEqual(zapi.getParent(zope), tools)
+ self.assertEqual(zapi.getName(zope), 'zope')
+
+
def testDelete(self):
path = '/++etc++site/@@AddITranslationDomainTool'
# create the view
Modified: Zope3/trunk/src/zope/app/site/browser/tools.py
===================================================================
--- Zope3/trunk/src/zope/app/site/browser/tools.py 2004-07-07 21:15:13 UTC (rev 26190)
+++ Zope3/trunk/src/zope/app/site/browser/tools.py 2004-07-07 21:37:53 UTC (rev 26191)
@@ -361,7 +361,7 @@
registration = UtilityRegistration(self.contentName,
self._addFilterInterface,
zapi.getPath(util))
- reg_view = AddRegistration(content, self.request)
+ reg_view = AddRegistration(util, self.request)
reg_view.add(registration)
return util
More information about the Zope3-Checkins
mailing list