setuphandler cleanup easyshop
Stefan Bund [Mon, 22 Feb 2010 20:45:37 +0000 (21:45 +0100)]
src/koehsel.policy/koehsel/policy/setuphandlers.py

index c37da6a..c8576f4 100644 (file)
@@ -47,9 +47,10 @@ def siteSetupContent(site):
     # Add sample user
     
     mt = getToolByName(site,'portal_membership')
-    mt.addMember('shop','shop',[],[])
+    mt.addMember(id='shop', password='shop', roles=('Member',), domains=())
     member = mt.getMemberById('shop')
-    member.setMemberProperties({'fullname': 'Shop Testuser'})
+    member.setMemberProperties({'fullname': 'Shop Testuser'},
+                               {'email': 'test@localhost'})
 
 
 def makeObject(container, type_name, id, **kw):
@@ -71,10 +72,10 @@ def siteSetup(context):
         return
 
     site = context.getSite()
-    qi = getToolByName(site, 'portal_quickinstaller')
 
-    # Install EasyShop product
+    # Install products
 
+    qi = getToolByName(site, 'portal_quickinstaller')
     for p in INSTALL_PRODUCTS:
         if not qi.isProductInstalled(p):
             qi.installProduct(p)