Index: main/waeup.futminna/trunk/src/waeup/futminna/students/tests/test_browser.py
===================================================================
--- main/waeup.futminna/trunk/src/waeup/futminna/students/tests/test_browser.py	(revision 8721)
+++ main/waeup.futminna/trunk/src/waeup/futminna/students/tests/test_browser.py	(revision 8907)
@@ -29,19 +29,7 @@
 from waeup.kofa.interfaces import (
     IExtFileStore, IFileStoreNameChooser)
-from waeup.kofa.students.batching import StudentProcessor
 from waeup.kofa.students.interfaces import IStudentsUtils
-from waeup.futminna.students.batching import CustomStudentProcessor
 from waeup.futminna.testing import FunctionalLayer
-from waeup.futminna.students.interfaces import (
-    ICustomStudentStudyCourse, ICustomStudent,
-    ICustomStudentStudyLevel, ICustomCourseTicket)
-
-
-STUDENT_SAMPLE_DATA = open(
-    os.path.join(os.path.dirname(__file__), 'sample_student_data.csv'),
-    'rb').read()
-
-STUDENT_HEADER_FIELDS = STUDENT_SAMPLE_DATA.split(
-    '\n')[0].split(',')
+
 
 class StudentProcessorTest(FunctionalTestCase):
@@ -68,9 +56,4 @@
         setSite(app)
 
-        self.processor_base = StudentProcessor()
-        self.processor = CustomStudentProcessor()
-        self.workdir = tempfile.mkdtemp()
-        self.csv_file = os.path.join(self.workdir, 'sample_student_data.csv')
-        open(self.csv_file, 'wb').write(STUDENT_SAMPLE_DATA)
 
     def tearDown(self):
@@ -81,22 +64,4 @@
         return
 
-    def test_import(self):
-        # We have an empty column 'date_of_birth' in  the import file.
-        # The original processor will fail because 'date_of_birth' is required
-        # in the base package.
-        num, num_warns, fin_file, fail_file = self.processor_base.doImport(
-            self.csv_file, STUDENT_HEADER_FIELDS)
-        self.assertEqual(num_warns,3)
-        assert len(self.app['students'].keys()) == 0
-        # The customized processor does not complain since 'date_of_birth' is
-        # not required in the custom package.
-        num, num_warns, fin_file, fail_file = self.processor.doImport(
-            self.csv_file, STUDENT_HEADER_FIELDS)
-        #print open(fail_file).read()
-        self.assertEqual(num_warns,0)
-        assert len(self.app['students'].keys()) == 3
-        shutil.rmtree(os.path.dirname(fin_file))
-
-
 class StudentUITests(StudentsFullSetup):
     """Tests for customized student class views and pages
@@ -104,80 +69,4 @@
 
     layer = FunctionalLayer
-
-    def test_classes(self):
-        # Let's see if objects created in the customized
-        # portal really implement the customized interfaces
-        verify.verifyObject(ICustomStudent, self.student)
-        verify.verifyObject(
-            ICustomStudentStudyCourse, self.student['studycourse'])
-        studylevel = createObject(u'waeup.StudentStudyLevel')
-        verify.verifyObject(ICustomStudentStudyLevel, studylevel)
-        ticket = createObject(u'waeup.CourseTicket')
-        verify.verifyObject(ICustomCourseTicket, ticket)
-        IWorkflowState(self.student).setState('returning')
-        # Let's see if next_session_allowed works as expected
-        # A, ug_ft, 100
-        self.assertTrue(self.student['studycourse'].next_session_allowed)
-        # O, ug_ft, 100
-        self.student['studycourse'].current_verdict = 'O'
-        self.assertTrue(self.student['studycourse'].next_session_allowed)
-        # O, ug_ft, 200
-        self.student['studycourse'].current_level = 200
-        self.assertFalse(self.student['studycourse'].next_session_allowed)
-        # O, de_ft, 200
-        self.student['studycourse'].certificate.study_mode = 'de_ft'
-        self.assertTrue(self.student['studycourse'].next_session_allowed)
-        # O, ph_ft, 300
-        self.student['studycourse'].certificate.study_mode = 'ph_ft'
-        self.student['studycourse'].current_level = 300
-        self.assertTrue(self.student['studycourse'].next_session_allowed)
-        # O, ph_ft, 400
-        self.student['studycourse'].current_level = 400
-        self.assertFalse(self.student['studycourse'].next_session_allowed)
-
-        # Now we convert the certificate into a postgraduate certificate
-        IWorkflowState(self.student).setState('school fee paid')
-        self.certificate.study_mode = 'pg_ft'
-        # ... and voila next session registration is allowed
-        self.assertTrue(self.student['studycourse'].next_session_allowed)
-
-    def test_manage_access(self):
-        # Managers can access the pages of students
-        # and can perform actions
-        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
-        # The student created in the base package is an ug student
-        self.browser.open(self.student_path)
-        self.browser.getLink("Clearance Data").click()
-        self.assertEqual(self.browser.headers['Status'], '200 Ok')
-        self.assertEqual(self.browser.url, self.clearance_path)
-        self.browser.getLink("Manage").click()
-        self.assertEqual(self.browser.headers['Status'], '200 Ok')
-        self.assertEqual(self.browser.url, self.manage_clearance_path)
-        self.browser.getControl(name="form.date_of_birth").value = '09/10/1961'
-        self.browser.getControl("Save").click()
-        self.assertMatches('...Form has been saved...',
-                           self.browser.contents)
-        self.assertMatches('...First Sitting Record...',
-                           self.browser.contents)
-        # Managers can open clearance slip of ug students
-        self.browser.open(self.student_path + '/clearance.pdf')
-        self.assertEqual(self.browser.headers['Status'], '200 Ok')
-        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
-        # There is no pg field in the clearance form
-        self.assertFalse('Second Higher Education Record'
-            in self.browser.contents)
-        # Now we change the study mode ...
-        self.certificate.study_mode = 'pg_ft'
-        self.browser.open(self.clearance_path)
-        # ... and additional pg clearance fields appear
-        self.assertMatches('...Second Higher Education Record...',
-                           self.browser.contents)
-        # But also fields from the ug form are displayed
-        self.assertMatches('...First Sitting Record...',
-                           self.browser.contents)
-        # Managers can open clearance slip of pg students
-        self.browser.open(self.student_path + '/clearance.pdf')
-        self.assertEqual(self.browser.headers['Status'], '200 Ok')
-        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
 
     def test_manage_payments(self):
@@ -281,31 +170,4 @@
         self.assertMatches('...Session configuration object is not...',
                            self.browser.contents)
-
-    def test_student_access(self):
-        # Students can edit clearance data
-        IWorkflowState(self.student).setState('cleared')
-        self.student.clearance_locked = False
-        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()
-        # Even in state admitted students can't change the portait if
-        # application slip exists.
-        IWorkflowState(self.student).setState('admitted')
-        self.browser.open(self.student_path)
-        self.assertTrue('Change portrait' in self.browser.contents)
-        file_store = getUtility(IExtFileStore)
-        applicant_slip = 'My application slip'
-        file_id = IFileStoreNameChooser(self.student).chooseName(
-            attr="application_slip.pdf")
-        file_store.createFile(file_id, StringIO(applicant_slip))
-        self.browser.open(self.student_path)
-        self.assertFalse('Change portrait' in self.browser.contents)
-        self.browser.open(self.student_path + '/change_portrait')
-        self.assertTrue('The requested form is locked' in self.browser.contents)
-        # Student can view and edit clearance data
-        self.browser.getLink("Clearance Data").click()
-        self.browser.getLink("Edit").click()
-        self.assertTrue('Save' in self.browser.contents)
 
     def test_get_returning_data(self):
