Index: main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py	(revision 14243)
+++ main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py	(revision 14244)
@@ -453,10 +453,36 @@
         self.student['accommodation'].addBedTicket(bedticket)
 
-    def test_student_payments(self):
+    def test_maintenance_fee_payment(self):
         self.certificate.study_mode = 'ug_ft'
         self.student['studycourse'].entry_session = 2013
+        self.student.nationality = u'NG'
+        IWorkflowState(self.student).setState('cleared')
+        self.browser.open(self.login_path)
+        self.browser.getControl(name="form.login").value = self.student_id
+        self.browser.getControl(name="form.password").value = 'spwd'
+        self.browser.getControl("Login").click()
+        self.browser.open(self.student_path + '/payments')
+        self.browser.getLink("Add current session payment ticket").click()
+        self.browser.getControl(name="form.p_category").value = ['hostel_maintenance']
+        self.browser.getControl("Create ticket").click()
+        self.assertTrue('ticket created' in self.browser.contents)
+        value = self.student['payments'].keys()[0]
+        self.browser.getLink(value).click()
+        self.assertTrue('<span>My bed coordinates</span>' in self.browser.contents)
+        self.assertEqual(self.student['payments'][value].amount_auth, 876.0)
+        return
+
+    def test_student_schoolfee_payments(self):
+        configuration_1 = createObject('waeup.SessionConfiguration')
+        configuration_1.academic_session = 2016
+        self.app['configuration'].addSessionConfiguration(configuration_1)
+        self.certificate.study_mode = 'ug_ft'
+        self.student['studycourse'].entry_session = 2016
+        self.student['studycourse'].current_session = 2016
+        self.student['studycourse'].entry_mode = 'ug_ft'
         self.student['studycourse'].certificate.school_fee_1 = 50250.0
-        self.app['configuration']['2004'].union_fee = 1250.0
-        self.app['configuration']['2004'].welfare_fee = 750.0
+        self.app['configuration']['2016'].union_fee = 1250.0
+        self.app['configuration']['2016'].welfare_fee = 750.0
+        self.app['configuration']['2016'].id_card_fee = 350.0
         self.student.nationality = u'NG'
         # Login
@@ -475,5 +501,6 @@
         self.browser.getLink(value).click()
         self.assertTrue('Amount Authorized' in self.browser.contents)
-        self.assertEqual(self.student['payments'][value].amount_auth, 51750.0)
+        # 50250 + 1000 + 500 + 100 = 51850
+        self.assertEqual(self.student['payments'][value].amount_auth, 51850.0)
         self.browser.open(self.browser.url + '/payment_slip.pdf')
         self.assertEqual(self.browser.headers['Status'], '200 Ok')
@@ -489,19 +516,6 @@
         self.browser.getControl("Create ticket").click()
         self.assertTrue(
-            'You must chose a payment which includes additional fees'
-            in self.browser.contents)
-        #self.assertTrue(
-        #    'Another school fee payment for this session has already been made'
-        #    in self.browser.contents)
-        # Test hostel maintenance payments
-        self.browser.open(self.student_path + '/payments')
-        self.browser.getLink("Add current session payment ticket").click()
-        self.browser.getControl(name="form.p_category").value = ['hostel_maintenance']
-        self.browser.getControl("Create ticket").click()
-        self.assertTrue('ticket created' in self.browser.contents)
-        value = self.student['payments'].keys()[1]
-        self.browser.getLink(value).click()
-        self.assertTrue('<span>My bed coordinates</span>' in self.browser.contents)
-        self.assertEqual(self.student['payments'][value].amount_auth, 876.0)
+            'You must choose a payment which includes additional fees'
+            in self.browser.contents)
         return
 
