Index: main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/applicants/tests/test_browser.py
===================================================================
--- main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/applicants/tests/test_browser.py	(revision 10379)
+++ main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/applicants/tests/test_browser.py	(revision 10899)
@@ -43,4 +43,7 @@
 from kofacustom.nigeria.applicants.batching import NigeriaApplicantProcessor
 
+session_1 = datetime.datetime.now().year - 2
+app_container_name = u'app%s' % session_1
+pgft_container_name = u'pgft%s' % session_1
 
 class ApplicantUITest(FunctionalTestCase):
@@ -68,19 +71,19 @@
         # Add an two different applicants containers
         self.pgcontainer = ApplicantsContainer()
-        self.pgcontainer.code = u'pgft2011'
+        self.pgcontainer.code = pgft_container_name
         self.pgcontainer.prefix = u'pgft'
         self.pgcontainer.application_category = u'pg_ft'
-        self.pgcontainer.year = 2011
+        self.pgcontainer.year = session_1
         self.pgcontainer.application_fee = 300.0
-        self.pgcontainer.title = u'This is the pgft2011 container'
-        self.app['applicants']['pgft2011'] = self.pgcontainer
+        self.pgcontainer.title = u'This is the %s container' % pgft_container_name
+        self.app['applicants'][pgft_container_name] = self.pgcontainer
         self.ugcontainer = ApplicantsContainer()
-        self.ugcontainer.code = u'putme2011'
-        self.ugcontainer.prefix = u'putme'
+        self.ugcontainer.code = app_container_name
+        self.ugcontainer.prefix = u'app'
         self.ugcontainer.application_category = u'basic'
-        self.ugcontainer.year = 2011
+        self.ugcontainer.year = session_1
         self.ugcontainer.application_fee = 200.0
-        self.ugcontainer.title = u'This is the app2011 container'
-        self.app['applicants']['app2011'] = self.ugcontainer
+        self.ugcontainer.title = u'This is the %s container' % app_container_name
+        self.app['applicants'][app_container_name] = self.ugcontainer
 
         self.ugcontainer.mode = 'update'
@@ -113,7 +116,7 @@
         pgapplicant.firstname = u'Anna'
         pgapplicant.lastname = u'Post'
-        self.app['applicants']['pgft2011'].addApplicant(pgapplicant)
+        self.app['applicants'][pgft_container_name].addApplicant(pgapplicant)
         self.pgapplication_number = pgapplicant.application_number
-        self.pgapplicant = self.app['applicants']['pgft2011'][
+        self.pgapplicant = self.app['applicants'][pgft_container_name][
             self.pgapplication_number]
 
@@ -121,15 +124,20 @@
         ugapplicant.firstname = u'Klaus'
         ugapplicant.lastname = u'Under'
-        self.app['applicants']['app2011'].addApplicant(ugapplicant)
+        self.app['applicants'][app_container_name].addApplicant(ugapplicant)
         self.ugapplication_number = ugapplicant.application_number
-        self.ugapplicant = self.app['applicants']['app2011'][
+        self.ugapplicant = self.app['applicants'][app_container_name][
             self.ugapplication_number]
-        self.pgapplicant_path = ('http://localhost/app/applicants/pgft2011/%s'
-            % self.pgapplication_number)
-        self.ugapplicant_path = ('http://localhost/app/applicants/app2011/%s'
-            % self.ugapplication_number)
+        self.pgapplicant_path = ('http://localhost/app/applicants/%s/%s'
+            % (pgft_container_name, self.pgapplication_number))
+        self.ugapplicant_path = ('http://localhost/app/applicants/%s/%s'
+            % (app_container_name, self.ugapplication_number))
 
         self.browser = Browser()
         self.browser.handleErrors = False
+
+        configuration = SessionConfiguration()
+        configuration.academic_session = session_1
+        configuration.application_fee = 200.0
+        self.app['configuration'].addSessionConfiguration(configuration)
 
     def tearDown(self):
@@ -213,6 +221,6 @@
         payment_id = self.ugapplicant.keys()[0]
         payment = self.ugapplicant[payment_id]
-        self.assertEqual(payment.p_item,'This is the app2011 container')
-        self.assertEqual(payment.p_session,2011)
+        self.assertEqual(payment.p_item,'This is the %s container' % app_container_name)
+        self.assertEqual(payment.p_session,session_1)
         self.assertEqual(payment.p_category,'application')
         self.assertEqual(payment.amount_auth, 200.0)
@@ -235,6 +243,6 @@
         payment_id = self.pgapplicant.keys()[0]
         payment = self.pgapplicant[payment_id]
-        self.assertEqual(payment.p_item,'This is the pgft2011 container')
-        self.assertEqual(payment.p_session,2011)
+        self.assertEqual(payment.p_item,'This is the %s container' % pgft_container_name)
+        self.assertEqual(payment.p_session,session_1)
         self.assertEqual(payment.p_category,'application')
         self.assertEqual(payment.amount_auth, 300.0)
@@ -265,5 +273,5 @@
         self.ugapplicant.reg_number = u'1234'
         notify(grok.ObjectModifiedEvent(self.ugapplicant))
-        self.browser.open('http://localhost/app/applicants/app2011/')
+        self.browser.open('http://localhost/app/applicants/%s/' % app_container_name)
         self.browser.getLink("Register for application").click()
         # Fill the edit form with suitable values
@@ -291,5 +299,5 @@
         self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
         manage_path = 'http://localhost/app/applicants/%s/%s/%s' % (
-            'app2011', self.ugapplicant.application_number, 'manage')
+            app_container_name, self.ugapplicant.application_number, 'manage')
         self.browser.open(manage_path)
         self.fill_correct_values()
@@ -362,5 +370,6 @@
             'password,phone,pp_school,presently_inst,reg_number,'
             'result_uploaded,screening_date,screening_score,'
-            'screening_venue,sex,state,student_id,suspended,container_code\r\n'
+            'screening_venue,sex,special_application,'
+            'state,student_id,suspended,container_code\r\n'
             ',dp2011_654321,,654321,CERT1,CERT1,CERT1,1981-02-04#,'
             'Anna M. Tester,anna@sample.com,,,,,,,,,,,Anna,'
@@ -368,5 +377,5 @@
             ',,,,,,,,,Tester,,0,M.,NG,"Some notice\nin lines.",,,'
             'any password,+234-123-12345#,,,123456,,'
-            '"Saturday, 16th June 2012 2:00:00 PM",98,Exam Room,f,initialized,,'
+            '"Saturday, 16th June 2012 2:00:00 PM",98,Exam Room,f,,initialized,,'
             '0,dp2011\r\n')
         # We can import the same file if we ignore some columns.
@@ -387,4 +396,5 @@
             'reg_number','result_uploaded',
             'screening_date','screening_score','screening_venue','sex',
+            'special_application',
             'state','student_id','suspended','container_code'],
             mode='create')
@@ -411,5 +421,5 @@
             'nysc_year','password','phone','pp_school','presently_inst',
             'reg_number','result_uploaded','screening_date','screening_score',
-            'screening_venue','sex',
+            'screening_venue','sex','special_application',
             'state','student_id','suspended','ignore_container_code'],
             mode='update')
