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 12068)
+++ /main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py	(revision 12069)
@@ -68,6 +68,6 @@
     # Complete setup for customers handlings is rather complex and
     # requires lots of things created before we can start. This is a
-    # setup that does all this, creates a university, creates PINs,
-    # etc.  so that we do not have to bother with that in different
+    # setup that does all this, creates a company etc.
+    # so that we do not have to bother with that in different
     # test cases.
 
Index: /main/waeup.ikoba/trunk/src/waeup/ikoba/products/test_product.py
===================================================================
--- /main/waeup.ikoba/trunk/src/waeup/ikoba/products/test_product.py	(revision 12069)
+++ /main/waeup.ikoba/trunk/src/waeup/ikoba/products/test_product.py	(revision 12069)
@@ -0,0 +1,63 @@
+## $Id$
+##
+## Copyright (C) 2014 Uli Fouquet & Henrik Bettermann
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+"""
+Tests for products.
+"""
+from zope.interface.verify import verifyClass, verifyObject
+from zope.component import createObject
+from hurry.workflow.interfaces import (
+    IWorkflowInfo, IWorkflowState, InvalidTransitionError)
+from waeup.ikoba.products.interfaces import (
+    IProductsContainer, IProduct)
+from waeup.ikoba.interfaces import IObjectHistory
+from waeup.ikoba.products.container import ProductsContainer
+from waeup.ikoba.products.product import Product
+from waeup.ikoba.testing import (FunctionalLayer, FunctionalTestCase)
+
+class ProductsContainerTestCase(FunctionalTestCase):
+
+    layer = FunctionalLayer
+
+    def test_interfaces(self):
+        # Make sure the correct interfaces are implemented.
+        self.assertTrue(
+            verifyClass(
+                IProductsContainer, ProductsContainer)
+            )
+        self.assertTrue(
+            verifyObject(
+                IProductsContainer, ProductsContainer())
+            )
+        self.assertTrue(
+            verifyClass(
+                IProduct, Product)
+            )
+        self.assertTrue(
+            verifyObject(
+                IProduct, Product())
+            )
+        return
+
+    def test_addProduct(self):
+        container = ProductsContainer()
+        product = createObject(u'waeup.Product')
+        container.addProduct(product)
+        self.assertRaises(TypeError, container.addProduct, object())
+        self.assertEqual(product.product_id, 'NA')
+        self.assertEqual(container['NA'], product)
+        return
Index: in/waeup.ikoba/trunk/src/waeup/ikoba/products/tests.py
===================================================================
--- /main/waeup.ikoba/trunk/src/waeup/ikoba/products/tests.py	(revision 12068)
+++ 	(revision )
@@ -1,63 +1,0 @@
-## $Id$
-##
-## Copyright (C) 2014 Uli Fouquet & Henrik Bettermann
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##
-"""
-Tests for products.
-"""
-from zope.interface.verify import verifyClass, verifyObject
-from zope.component import createObject
-from hurry.workflow.interfaces import (
-    IWorkflowInfo, IWorkflowState, InvalidTransitionError)
-from waeup.ikoba.products.interfaces import (
-    IProductsContainer, IProduct)
-from waeup.ikoba.interfaces import IObjectHistory
-from waeup.ikoba.products.container import ProductsContainer
-from waeup.ikoba.products.product import Product
-from waeup.ikoba.testing import (FunctionalLayer, FunctionalTestCase)
-
-class ProductsContainerTestCase(FunctionalTestCase):
-
-    layer = FunctionalLayer
-
-    def test_interfaces(self):
-        # Make sure the correct interfaces are implemented.
-        self.assertTrue(
-            verifyClass(
-                IProductsContainer, ProductsContainer)
-            )
-        self.assertTrue(
-            verifyObject(
-                IProductsContainer, ProductsContainer())
-            )
-        self.assertTrue(
-            verifyClass(
-                IProduct, Product)
-            )
-        self.assertTrue(
-            verifyObject(
-                IProduct, Product())
-            )
-        return
-
-    def test_addProduct(self):
-        container = ProductsContainer()
-        product = createObject(u'waeup.Product')
-        container.addProduct(product)
-        self.assertRaises(TypeError, container.addProduct, object())
-        self.assertEqual(product.product_id, 'NA')
-        self.assertEqual(container['NA'], product)
-        return
Index: /main/waeup.ikoba/trunk/src/waeup/ikoba/products/tests/test_browser.py
===================================================================
--- /main/waeup.ikoba/trunk/src/waeup/ikoba/products/tests/test_browser.py	(revision 12069)
+++ /main/waeup.ikoba/trunk/src/waeup/ikoba/products/tests/test_browser.py	(revision 12069)
@@ -0,0 +1,101 @@
+## $Id: test_browser.py 12062 2014-11-26 13:03:56Z henrik $
+## 
+## Copyright (C) 2014 Uli Fouquet & Henrik Bettermann
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+## 
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+## 
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+"""
+Test the products-related UI components.
+"""
+import shutil
+import tempfile
+import pytz
+import base64
+from datetime import datetime, timedelta, date
+from StringIO import StringIO
+import os
+import grok
+from zc.async.testing import wait_for_result
+from zope.event import notify
+from zope.component import createObject, queryUtility, getUtility
+from zope.component.hooks import setSite, clearSite
+from zope.catalog.interfaces import ICatalog
+from zope.security.interfaces import Unauthorized
+from zope.securitypolicy.interfaces import IPrincipalRoleManager
+from zope.testbrowser.testing import Browser
+from hurry.workflow.interfaces import IWorkflowInfo, IWorkflowState
+from waeup.ikoba.testing import FunctionalLayer, FunctionalTestCase
+from waeup.ikoba.app import Company
+from waeup.ikoba.interfaces import IUserAccount, IJobManager, APPROVED
+from waeup.ikoba.authentication import LocalRoleSetEvent
+from waeup.ikoba.tests.test_async import FunctionalAsyncTestCase
+from waeup.ikoba.documents.workflow import VERIFIED
+from waeup.ikoba.browser.tests.test_pdf import samples_dir
+
+def lookup_submit_value(name, value, browser):
+    """Find a button with a certain value."""
+    for num in range(0, 100):
+        try:
+            button = browser.getControl(name=name, index=num)
+            if button.value.endswith(value):
+                return button
+        except IndexError:
+            break
+    return None
+
+class ProductssFullSetup(FunctionalTestCase):
+    # A test case that only contains a setup and teardown
+    #
+    # Complete setup for products handlings is rather complex and
+    # requires lots of things created before we can start. This is a
+    # setup that does all this, creates a company,
+    # etc.  so that we do not have to bother with that in different
+    # test cases.
+
+    layer = FunctionalLayer
+
+    def setUp(self):
+        super(ProductssFullSetup, self).setUp()
+
+        # Setup a sample site for each test
+        app = Company()
+        self.dc_root = tempfile.mkdtemp()
+        app['datacenter'].setStoragePath(self.dc_root)
+
+        # Prepopulate the ZODB...
+        self.getRootFolder()['app'] = app
+        # we add the site immediately after creation to the
+        # ZODB. Catalogs and other local utilities are not setup
+        # before that step.
+        self.app = self.getRootFolder()['app']
+        # Set site here. Some of the following setup code might need
+        # to access grok.getSite() and should get our new app then
+        setSite(app)
+
+
+        self.login_path = 'http://localhost/app/login'
+
+        self.app['configuration'].carry_over = True
+        configuration = createObject('waeup.SessionConfiguration')
+        self.app['configuration'].addSessionConfiguration(configuration)
+
+        # Put the prepopulated site into test ZODB and prepare test
+        # browser
+        self.browser = Browser()
+        self.browser.handleErrors = False
+
+    def tearDown(self):
+        super(CustomersFullSetup, self).tearDown()
+        clearSite()
+        shutil.rmtree(self.dc_root)
