Index: main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py
===================================================================
--- main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py	(revision 12037)
+++ main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py	(revision 12038)
@@ -333,17 +333,17 @@
         self.browser.open(self.manage_customer_path)
         image = open(SAMPLE_IMAGE_BMP, 'rb')
-        ctrl = self.browser.getControl(name='passportuploadmanage')
+        ctrl = self.browser.getControl(name='passportmanageupload')
         file_ctrl = ctrl.mech_control
         file_ctrl.add_file(image, filename='my_photo.bmp')
         self.browser.getControl(
-            name='upload_passportuploadmanage').click()
+            name='upload_passportmanageupload').click()
         self.assertTrue('jpg file extension expected'
             in self.browser.contents)
-        ctrl = self.browser.getControl(name='passportuploadmanage')
+        ctrl = self.browser.getControl(name='passportmanageupload')
         file_ctrl = ctrl.mech_control
         image = open(SAMPLE_IMAGE, 'rb')
         file_ctrl.add_file(image, filename='my_photo.jpg')
         self.browser.getControl(
-            name='upload_passportuploadmanage').click()
+            name='upload_passportmanageupload').click()
         self.assertTrue(
             'src="http://localhost/app/customers/K1000000/passport.jpg"'
@@ -561,10 +561,10 @@
         # Admitted customer can upload a passport picture
         self.browser.getLink("Change portrait").click()
-        ctrl = self.browser.getControl(name='passportuploadedit')
+        ctrl = self.browser.getControl(name='passporteditupload')
         file_obj = open(SAMPLE_IMAGE, 'rb')
         file_ctrl = ctrl.mech_control
         file_ctrl.add_file(file_obj, filename='my_photo.jpg')
         self.browser.getControl(
-            name='upload_passportuploadedit').click()
+            name='upload_passporteditupload').click()
         self.assertTrue(
             'src="http://localhost/app/customers/K1000000/passport.jpg"'
@@ -786,7 +786,7 @@
         self.browser.getLink("Documents").click()
         self.browser.getLink("Add document").click()
-        self.browser.getControl(name="doctype").value = ['generic']
+        self.browser.getControl(name="doctype").value = ['sample']
         self.browser.getControl("Create document").click()
-        self.assertTrue('Generic Document created.' in self.browser.contents)
+        self.assertTrue('Sample Document created.' in self.browser.contents)
         document = self.customer['documents']['d102']
 
@@ -827,5 +827,5 @@
         self.assertTrue(
             'INFO - zope.mgr - customers.browser.DocumentAddFormPage '
-            '- K1000000 - added: Generic Document %s'
+            '- K1000000 - added: Sample Document %s'
             % document.document_id in logcontent)
 
@@ -845,7 +845,7 @@
         self.browser.getLink("Documents").click()
         self.browser.getLink("Add document").click()
-        self.browser.getControl(name="doctype").value = ['generic']
+        self.browser.getControl(name="doctype").value = ['sample']
         self.browser.getControl("Create document").click()
-        self.assertTrue('Generic Document created.' in self.browser.contents)
+        self.assertTrue('Sample Document created.' in self.browser.contents)
         document = self.customer['documents']['d102']
 
@@ -866,12 +866,12 @@
         # Costumer can upload a document.
         self.browser.getLink("Edit").click()
-        ctrl = self.browser.getControl(name='genericuploadedit')
+        ctrl = self.browser.getControl(name='scaneditupload')
         file_obj = open(SAMPLE_IMAGE, 'rb')
         file_ctrl = ctrl.mech_control
         file_ctrl.add_file(file_obj, filename='my_document.jpg')
         self.browser.getControl(
-            name='upload_genericuploadedit').click()
-        self.assertTrue(
-            'href="http://localhost/app/customers/K1000000/documents/d102/generic"'
+            name='upload_scaneditupload').click()
+        self.assertTrue(
+            'href="http://localhost/app/customers/K1000000/documents/d102/scan"'
             in self.browser.contents)
         # Costumer can submit the form. The form is also saved.
@@ -890,27 +890,26 @@
         self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
         self.browser.open(self.customer_path + '/documents/d101/manage')
-        # Create a pseudo image file and select it to be uploaded in form
-        # as generic document
+        # Create a pseudo image file and select it to be uploaded 
         image = open(SAMPLE_IMAGE, 'rb')
-        ctrl = self.browser.getControl(name='genericuploadmanage')
+        ctrl = self.browser.getControl(name='scanmanageupload')
         file_ctrl = ctrl.mech_control
-        file_ctrl.add_file(image, filename='my_generic_document.jpg')
+        file_ctrl.add_file(image, filename='my_scan.jpg')
         # The Save action does not upload files
         self.browser.getControl("Save").click() # submit form
         self.assertFalse(
-            'href="http://localhost/app/customers/K1000000/documents/d101/generic"'
+            'href="http://localhost/app/customers/K1000000/documents/d101/scan"'
             in self.browser.contents)
         # ... but the correct upload submit button does
         image = open(SAMPLE_IMAGE)
-        ctrl = self.browser.getControl(name='genericuploadmanage')
+        ctrl = self.browser.getControl(name='scanmanageupload')
         file_ctrl = ctrl.mech_control
-        file_ctrl.add_file(image, filename='my_generic_document.jpg')
-        self.browser.getControl(
-            name='upload_genericuploadmanage').click()
-        self.assertTrue(
-            'href="http://localhost/app/customers/K1000000/documents/d101/generic"'
+        file_ctrl.add_file(image, filename='my_scan.jpg')
+        self.browser.getControl(
+            name='upload_scanmanageupload').click()
+        self.assertTrue(
+            'href="http://localhost/app/customers/K1000000/documents/d101/scan"'
             in self.browser.contents)
         # Browsing the link shows a real image
-        self.browser.open('generic')
+        self.browser.open('scan')
         self.assertEqual(
             self.browser.headers['content-type'], 'image/jpeg')
@@ -919,40 +918,40 @@
         self.browser.open(self.customer_path + '/documents/d101/manage')
         self.assertFalse(
-            'upload_genericuploadmanage' in self.browser.contents)
+            'upload_scanmanageupload' in self.browser.contents)
         # File must be deleted first
-        self.browser.getControl(name='delete_genericuploadmanage').click()
-        self.assertTrue(
-            'generic deleted' in self.browser.contents)
+        self.browser.getControl(name='delete_scanmanageupload').click()
+        self.assertTrue(
+            'scan deleted' in self.browser.contents)
         # Uploading a file which is bigger than 150k will raise an error
         big_image = StringIO(open(SAMPLE_IMAGE, 'rb').read() * 75)
-        ctrl = self.browser.getControl(name='genericuploadmanage')
+        ctrl = self.browser.getControl(name='scanmanageupload')
         file_ctrl = ctrl.mech_control
-        file_ctrl.add_file(big_image, filename='my_generic_document.jpg')
-        self.browser.getControl(
-            name='upload_genericuploadmanage').click()
+        file_ctrl.add_file(big_image, filename='my_scan.jpg')
+        self.browser.getControl(
+            name='upload_scanmanageupload').click()
         self.assertTrue(
             'Uploaded file is too big' in self.browser.contents)
         # we do not rely on filename extensions given by uploaders
         image = open(SAMPLE_IMAGE, 'rb') # a jpg-file
-        ctrl = self.browser.getControl(name='genericuploadmanage')
+        ctrl = self.browser.getControl(name='scanmanageupload')
         file_ctrl = ctrl.mech_control
         # tell uploaded file is bmp
-        file_ctrl.add_file(image, filename='my_generic_document.bmp')
-        self.browser.getControl(
-            name='upload_genericuploadmanage').click()
+        file_ctrl.add_file(image, filename='my_scan.bmp')
+        self.browser.getControl(
+            name='upload_scanmanageupload').click()
         self.assertTrue(
             # jpg file was recognized
-            'File generic.jpg uploaded.' in self.browser.contents)
+            'File scan.jpg uploaded.' in self.browser.contents)
         # Delete file again
-        self.browser.getControl(name='delete_genericuploadmanage').click()
-        self.assertTrue(
-            'generic deleted' in self.browser.contents)
+        self.browser.getControl(name='delete_scanmanageupload').click()
+        self.assertTrue(
+            'scan deleted' in self.browser.contents)
         # File names must meet several conditions
         bmp_image = open(SAMPLE_IMAGE_BMP, 'rb')
-        ctrl = self.browser.getControl(name='genericuploadmanage')
+        ctrl = self.browser.getControl(name='scanmanageupload')
         file_ctrl = ctrl.mech_control
-        file_ctrl.add_file(bmp_image, filename='my_generic_document.bmp')
-        self.browser.getControl(
-            name='upload_genericuploadmanage').click()
+        file_ctrl.add_file(bmp_image, filename='my_scan.bmp')
+        self.browser.getControl(
+            name='upload_scanmanageupload').click()
         self.assertTrue('Only the following extensions are allowed'
             in self.browser.contents)
