[Zope-CVS] CVS: Products/Basket/tests - testBasket.py:1.15

Chris McDonough chrism at plope.com
Wed Nov 9 15:12:22 EST 2005


Update of /cvs-repository/Products/Basket/tests
In directory cvs.zope.org:/tmp/cvs-serv32686/tests

Modified Files:
	testBasket.py 
Log Message:
Untabify, fix tests broken by icon rename, fix name error looking for "basename" on os when registering an icon.


=== Products/Basket/tests/testBasket.py 1.14 => 1.15 ===
--- Products/Basket/tests/testBasket.py:1.14	Wed Nov  9 14:39:24 2005
+++ Products/Basket/tests/testBasket.py	Wed Nov  9 15:12:22 2005
@@ -15,9 +15,8 @@
 here = os.path.dirname(__file__)
 
 class DummyProduct:
-
-	def __init__(self, id):
-		self.id = id
+    def __init__(self, id):
+        self.id = id
 
 class DummyPackage:
     def __init__(self):
@@ -27,23 +26,27 @@
 
 class DummyApp(ObjectManager):
 
-	def __init__(self):
-		self.Control_Panel = SimpleItem()
-		self.Control_Panel.id = 'Control_Panel'
-		self.Control_Panel.Products = ObjectManager()
-		self.Control_Panel.Products.id = 'Products'
-
-        def _manage_remove_product_meta_type(self, product):
-            # hahahahahaha
-            # hahahahahahahaahaha
-            pass
+    def __init__(self):
+        self.Control_Panel = SimpleItem()
+        self.Control_Panel.id = 'Control_Panel'
+        self.Control_Panel.Products = ObjectManager()
+        self.Control_Panel.Products.id = 'Products'
+	
+    def _manage_remove_product_meta_type(self, product):
+         # hahahahahaha
+         # hahahahahahahaahaha
+         pass
 
 class DummyProductContext:
 
-	def __init__(self, product_name):
-		self._ProductContext__app = DummyApp()
-		self._ProductContext__prod = DummyProduct(product_name)
-		self._ProductContext__pack = DummyPackage()
+    def __init__(self, product_name):
+        self._ProductContext__app = DummyApp()
+        self._ProductContext__prod = DummyProduct(product_name)
+        self._ProductContext__pack = DummyPackage()
+
+    def registerClass(self, *arg, **kw):
+         self.arg = arg
+	 self.kw = kw
 
 class IDummyRegisterableClass(Interface):
     pass
@@ -369,7 +372,7 @@
         self.assertEqual(product.title,
             'Installed egg product DummyProduct (0.1-this-is-a-test-fixture)')
         self.assertEqual(product.version, '0.1-this-is-a-test-fixture')
-        self.assertEqual(product.icon, 'p_/InstalledProduct_icon')
+        self.assertEqual(product.icon, 'misc_/Basket/icon_egg.gif')
         self.failUnless(product.home.find('Basket') > -1)
         self.assertEqual(product.manage_options[:-1],
                 (Folder.manage_options[0],) + tuple(Folder.manage_options[2:]))



More information about the Zope-CVS mailing list