[Zope-CVS] CVS: Products/Basket/tests - testBasket.py:1.19
Chris McDonough
chrism at plope.com
Wed Nov 9 18:22:58 EST 2005
Update of /cvs-repository/Products/Basket/tests
In directory cvs.zope.org:/tmp/cvs-serv30183/tests
Modified Files:
testBasket.py
Log Message:
Show the eggname in the persistent product object's title.
=== Products/Basket/tests/testBasket.py 1.18 => 1.19 ===
--- Products/Basket/tests/testBasket.py:1.18 Wed Nov 9 17:31:13 2005
+++ Products/Basket/tests/testBasket.py Wed Nov 9 18:22:28 2005
@@ -390,7 +390,8 @@
def test_constructor(self):
app = DummyApp()
package = DummyPackage()
- context = self._makeOne('DummyProduct', dummy_initializer, app, package)
+ context = self._makeOne('DummyProduct', dummy_initializer, app, package,
+ 'eggname')
data = context.install()
self.assertEqual(data, 'initializer called')
self.assertEqual(context.productname, 'DummyProduct')
@@ -405,7 +406,8 @@
('Dummy.Foo', 'Products.Basket'),
('Dummy.Bar', 'Products.Basket')
)
- context = self._makeOne('DummyProduct', dummy_initializer, app, package)
+ context = self._makeOne('DummyProduct', dummy_initializer, app, package,
+ 'eggname')
data = context.install()
self.assertEqual(data, 'initializer called')
self.assertEqual(sys.modules['Dummy.Foo'].__name__,
@@ -419,7 +421,8 @@
def afunction():
pass
package.misc_ = {'afunction':afunction}
- context = self._makeOne('DummyProduct', dummy_initializer, app, package)
+ context = self._makeOne('DummyProduct', dummy_initializer, app, package,
+ 'eggname')
data = context.install()
from OFS import Application
self.assertEqual(
@@ -430,7 +433,8 @@
app = DummyApp()
package = DummyPackage()
package.__ac_permissions__ = ( ('aPermission', (), () ), )
- context = self._makeOne('DummyProduct', dummy_initializer, app, package)
+ context = self._makeOne('DummyProduct', dummy_initializer, app, package,
+ 'eggname')
data = context.install()
from OFS.Folder import Folder
self.assert_( ('aPermission', (),) in Folder.__ac_permissions__)
@@ -439,7 +443,8 @@
app = DummyApp()
package = DummyPackage()
package.meta_types = ( {'name':'grabass', 'action':'amethod'}, )
- context = self._makeOne('DummyProduct', dummy_initializer, app, package)
+ context = self._makeOne('DummyProduct', dummy_initializer, app, package,
+ 'eggname')
data = context.install()
from OFS.Folder import Folder
self.assertEqual(({'action': 'amethod', 'product': 'DummyProduct',
@@ -450,7 +455,8 @@
app = DummyApp()
package = DummyPackage()
package.methods = {'amethod':dummy_initializer}
- context = self._makeOne('DummyProduct', dummy_initializer, app, package)
+ context = self._makeOne('DummyProduct', dummy_initializer, app, package,
+ 'eggname')
data = context.install()
from OFS.Folder import Folder
self.assertEqual(Folder.amethod.im_func, dummy_initializer)
@@ -460,12 +466,14 @@
app = DummyApp()
products = app.Control_Panel.Products
package = DummyPackage()
- context = self._makeOne('DummyProduct', dummy_initializer, app, package)
+ context = self._makeOne('DummyProduct', dummy_initializer, app, package,
+ 'eggname')
product = products.DummyProduct
self.assertEqual(product.__class__.__name__, 'EggProduct')
self.assertEqual(product.id, 'DummyProduct')
self.assertEqual(product.title,
- 'Installed egg product DummyProduct (0.1-this-is-a-test-fixture)')
+ 'Installed egg product DummyProduct (0.1-this-is-a-test-fixture) '
+ 'from eggname')
self.assertEqual(product.version, '0.1-this-is-a-test-fixture')
self.assertEqual(product.icon, 'misc_/Basket/icon_egg.gif')
self.failUnless(product.home.find('Basket') > -1)
@@ -484,7 +492,8 @@
app = DummyApp()
products = app.Control_Panel.Products
package = DummyPackage()
- context = self._makeOne('DummyProduct', dummy_initializer, app, package)
+ context = self._makeOne('DummyProduct', dummy_initializer, app, package,
+ 'eggname')
product = products.DummyProduct
ob = context.create_product_object()
self.assertEqual(id(aq_base(product)), id(aq_base(ob)))
@@ -495,7 +504,8 @@
app = DummyApp()
products = app.Control_Panel.Products
package = DummyPackage()
- context = self._makeOne('DummyProduct', dummy_initializer, app, package)
+ context = self._makeOne('DummyProduct', dummy_initializer, app, package,
+ 'eggname')
product = products.DummyProduct
package.__import_error__ = 'yup'
del Globals.__disk_product_installed__
@@ -508,7 +518,8 @@
app = DummyApp()
products = app.Control_Panel.Products
package = DummyPackage()
- context = self._makeOne('DummyProduct', dummy_initializer, app, package)
+ context = self._makeOne('DummyProduct', dummy_initializer, app, package,
+ 'eggname')
def constructor(self, id):
pass
def constructor2(self, id):
@@ -551,7 +562,8 @@
app = DummyApp()
products = app.Control_Panel.Products
package = DummyPackage()
- context = self._makeOne('DummyProduct', dummy_initializer, app, package)
+ context = self._makeOne('DummyProduct', dummy_initializer, app, package,
+ 'eggname')
legacy = [('legacymethod2', legacymethod)]
def constructor(self):
pass
@@ -567,7 +579,8 @@
app = DummyApp()
products = app.Control_Panel.Products
package = DummyPackage()
- context = self._makeOne('DummyProduct', dummy_initializer, app, package)
+ context = self._makeOne('DummyProduct', dummy_initializer, app, package,
+ 'eggname')
def constructor(self, id):
pass
def constructor2(self, id):
@@ -586,7 +599,8 @@
app = DummyApp()
products = app.Control_Panel.Products
package = DummyPackage()
- context = self._makeOne('DummyProduct', dummy_initializer, app, package)
+ context = self._makeOne('DummyProduct', dummy_initializer, app, package,
+ 'eggname')
def constructor(self, id):
pass
constructors = (constructor,)
@@ -601,7 +615,8 @@
app = DummyApp()
products = app.Control_Panel.Products
package = DummyPackage()
- context = self._makeOne('DummyProduct', dummy_initializer, app, package)
+ context = self._makeOne('DummyProduct', dummy_initializer, app, package,
+ 'eggname')
def constructor(self, id):
pass
constructors = (constructor,)
@@ -624,7 +639,8 @@
app = DummyApp()
products = app.Control_Panel.Products
package = DummyPackage()
- context = self._makeOne('DummyProduct', dummy_initializer, app, package)
+ context = self._makeOne('DummyProduct', dummy_initializer, app, package,
+ 'eggname')
def constructor(self, id):
pass
context.registerClass(DummyRegisterableClass,
More information about the Zope-CVS
mailing list