Author: janguenot
Date: Tue Oct  4 19:35:59 2005
New Revision: 27934

Modified:
   z3lab/Zope3Benchs/trunk/test_Zope3.py
Log:
Use Lipsum to generate words

Modified: z3lab/Zope3Benchs/trunk/test_Zope3.py
==============================================================================
--- z3lab/Zope3Benchs/trunk/test_Zope3.py       (original)
+++ z3lab/Zope3Benchs/trunk/test_Zope3.py       Tue Oct  4 19:35:59 2005
@@ -40,6 +40,9 @@
         self.member_id = self.conf_get('main', 'member_id')
         self.member_pwd = self.conf_get('main', 'member_pwd')
 
+        # To generate words
+        self._lipsum = Lipsum()
+
         # For cleaning up at the end
         self._buddies_folder_ids = []
 
@@ -92,7 +95,7 @@
         while j < int(nb_buddies_folder):
 
             # Create the buddies folder
-            buddies_folder_id = str(random())
+            buddies_folder_id = self._lipsum.getUniqWord()
             params = [
                 ['type_name', 'BrowserAdd__buddydemo.buddy.BuddyFolder'],
                 ['id', buddies_folder_id],
@@ -113,7 +116,7 @@
 
                 # Create the buddies folder
                 # Step1 : Ask for the creation given an id
-                buddy_id = str(random())
+                buddy_id = self._lipsum.getUniqWord()
                 params = [
                     ['type_name', 'AddBuddy.html'],
                     ['id', buddy_id],
@@ -125,10 +128,10 @@
                 # Give informations and create the buddy
                 params = [
                     ['type_name', 'AddBuddy.html'],
-                    ['field.first', 'Julien'],
-                    ['field.last', 'Anguenot'],
+                    ['field.first', self._lipsum.getWord()],
+                    ['field.last', self._lipsum.getWord()],
                     ['field.email', '[EMAIL PROTECTED]'],
-                    ['field.address', 'Paris France'],
+                    ['field.address', self._lipsum.getAddress(lang="fr")],
                     ['field.postal_code','75015'],
                     ['UPDATE_SUBMIT', 'Add'],
                     ]
@@ -150,10 +153,10 @@
                 # Edit back the buddy
 
                 params = [
-                    ['field.first', 'Julien'],
-                    ['field.last', 'Anguenot'],
+                    ['field.first', self._lipsum.getWord()],
+                    ['field.last', self._lipsum.getWord()],
                     ['field.email', '[EMAIL PROTECTED]'],
-                    ['field.address', 'Helsinki Suomi'],
+                    ['field.address', self._lipsum.getAddress()],
                     ['field.postal_code','33000'],
                     ['UPDATE_SUBMIT', 'Change'],
                     ]
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to