Index: main/waeup.custom/trunk/src/waeup/custom/browser/tests.py
===================================================================
--- main/waeup.custom/trunk/src/waeup/custom/browser/tests.py	(revision 6926)
+++ main/waeup.custom/trunk/src/waeup/custom/browser/tests.py	(revision 6926)
@@ -0,0 +1,40 @@
+import tempfile
+import shutil
+from zope.testbrowser.testing import Browser
+from zope.component.hooks import setSite, clearSite
+from waeup.sirp.testing import FunctionalTestCase
+from waeup.custom.testing import FunctionalLayer
+from waeup.sirp.app import University
+
+class CustomPackageTests(FunctionalTestCase):
+
+    layer = FunctionalLayer
+
+    def setUp(self):
+        super(CustomPackageTests, self).setUp()
+
+        # Setup a sample site for each test
+        app = University()
+        self.dc_root = tempfile.mkdtemp()
+        app['datacenter'].setStoragePath(self.dc_root)
+
+        # Put the prepopulated site into test ZODB and prepare test
+        # browser
+        self.getRootFolder()['app'] = app
+        setSite(app)
+        self.browser = Browser()
+        self.browser.handleErrors = False
+
+    def tearDown(self):
+        super(CustomPackageTests, self).tearDown()
+        clearSite()
+        shutil.rmtree(self.dc_root)
+
+    def test_custom_theme(self):
+        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
+        self.browser.open('http://localhost/app/configuration')
+        self.assertMatches('...Custom Theme 1...', self.browser.contents)
+        self.browser.getControl(name="form.skin").value = ['custom theme 1']
+        self.browser.getControl("Save").click()
+        self.browser.open('http://localhost/app/configuration')
+        return
Index: main/waeup.custom/trunk/src/waeup/custom/students/tests.py
===================================================================
--- main/waeup.custom/trunk/src/waeup/custom/students/tests.py	(revision 6925)
+++ main/waeup.custom/trunk/src/waeup/custom/students/tests.py	(revision 6926)
@@ -10,4 +10,13 @@
     def test_manage_payments(self):
 
+        # Managers can add online payment tickets
+        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
+        self.browser.open(self.payments_student_path)
+        self.browser.getLink("Manage").click()
+        self.browser.getControl("Add online payment ticket").click()
+        self.browser.getControl("Create ticket").click()
+        self.assertMatches('...Session configuration object is not available...',
+                           self.browser.contents)
+
         # Set up SessionConfiguration object
         configuration = SessionConfiguration()
@@ -16,6 +25,4 @@
         self.app['configuration'].addSessionConfiguration(configuration)
 
-        # Managers can add online payment tickets
-        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
         self.browser.open(self.payments_student_path)
         self.browser.getLink("Manage").click()
@@ -46,2 +53,19 @@
         self.assertMatches('...ticket created...',
                            self.browser.contents)
+        self.browser.open(self.payments_student_path + '/addop')
+        self.browser.getControl(name="form.p_category").value = ['gown']
+        self.browser.getControl("Create ticket").click()
+        self.browser.open(self.payments_student_path + '/addop')
+        self.browser.getControl(name="form.p_category").value = ['transfer']
+        self.browser.getControl("Create ticket").click()
+        self.browser.open(self.payments_student_path + '/addop')
+        self.browser.getControl(name="form.p_category").value = ['hostel_maintenance']
+        self.browser.getControl("Create ticket").click()
+        self.certificate.study_mode = 'ug_pt'
+        self.browser.open(self.payments_student_path + '/addop')
+        self.browser.getControl(name="form.p_category").value = ['schoolfee']
+        self.browser.getControl("Create ticket").click()
+        self.assertMatches('...Amount could not be determined...',
+                           self.browser.contents)
+
+
Index: main/waeup.custom/trunk/src/waeup/custom/students/utils.py
===================================================================
--- main/waeup.custom/trunk/src/waeup/custom/students/utils.py	(revision 6925)
+++ main/waeup.custom/trunk/src/waeup/custom/students/utils.py	(revision 6926)
@@ -26,9 +26,6 @@
         surcharge_1 = academic_session.surcharge_1
         surcharge_2 = academic_session.surcharge_2
-        try:
-            amount = getSchoolFee(student, surcharge_1 + surcharge_2)
-            code = student['studycourse'].certificate.code
-        except AttributeError:
-            return 0, None, None, 0, 0, 0, 'School Fee could not be determined.'
+        amount = getSchoolFee(student, surcharge_1 + surcharge_2)
+        code = student['studycourse'].certificate.code
         #session_string = academic_sessions_vocab.by_value[p_session + 1].title
         p_item = code
