[Zope-CVS] CVS: Products/Basket/tests - testBasket.py:1.5
Chris McDonough
chrism at plope.com
Mon Nov 7 18:31:22 EST 2005
Update of /cvs-repository/Products/Basket/tests
In directory cvs.zope.org:/tmp/cvs-serv11747/tests
Modified Files:
testBasket.py
Log Message:
Test for get_containing_package
Pass in productname to product context instead of divining it inside the context.
=== Products/Basket/tests/testBasket.py 1.4 => 1.5 ===
--- Products/Basket/tests/testBasket.py:1.4 Mon Nov 7 18:09:10 2005
+++ Products/Basket/tests/testBasket.py Mon Nov 7 18:31:22 2005
@@ -5,6 +5,7 @@
import pkg_resources
import Products
from Products.Basket.utils import EggProductContext
+from Products.Basket import get_containing_package
from OFS.ObjectManager import ObjectManager
from OFS.SimpleItem import SimpleItem
@@ -214,6 +215,15 @@
self.failUnless(sys.modules.has_key('Products.product1'))
self.failUnless(sys.modules.has_key('Products.product2'))
self.failUnless(sys.modules.has_key('Products.diskproduct1'))
+
+ def test_get_containing_package(self):
+ self.assertEqual(
+ get_containing_package('Products.PageTemplates.PageTemplate'
+ ).__name__,
+ 'Products.PageTemplates')
+ self.assertEqual(
+ get_containing_package('Shared.DC.ZRDB').__name__,
+ 'Shared.DC.ZRDB')
def _importProduct(self, name):
__import__(name)
More information about the Zope-CVS
mailing list