Changeset 12417 for main


Ignore:
Timestamp:
8 Jan 2015, 07:59:46 (10 years ago)
Author:
Henrik Bettermann
Message:

Add test which shows that ResultEntry? fields are always modified when saving a form. The problem has not yet been solved.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/tests/test_browser.py

    r11090 r12417  
    3131from waeup.kofa.interfaces import (
    3232    IExtFileStore, IFileStoreNameChooser)
     33from waeup.kofa.schoolgrades import ResultEntry
    3334from waeup.kofa.students.batching import StudentProcessor
    3435from waeup.kofa.students.interfaces import IStudentsUtils
    3536from kofacustom.nigeria.students.batching import NigeriaStudentProcessor
    3637from kofacustom.nigeria.testing import FunctionalLayer
     38from kofacustom.nigeria.utils.utils import NigeriaKofaUtils
    3739from kofacustom.nigeria.students.interfaces import (
    3840    INigeriaStudentStudyCourse, INigeriaStudent,
     
    198200        self.assertMatches('...Form has been saved...',
    199201                           self.browser.contents)
     202
     203    def test_logging(self):
     204        self.student.nationality = u'DE'
     205        valid_subj = NigeriaKofaUtils().EXAM_SUBJECTS_DICT.keys()[0]
     206        valid_grade = NigeriaKofaUtils().EXAM_GRADES[0][0]
     207        result_entry = ResultEntry(valid_subj, valid_grade)
     208        self.student.fst_sit_results = [result_entry,]
     209        # Managers can access the pages of students
     210        # and can perform actions
     211        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
     212        # The student created in the base package is an ug student
     213        self.browser.open(self.student_path)
     214        self.browser.getLink("Clearance Data").click()
     215        self.browser.getLink("Manage").click()
     216        self.browser.getControl("Save").click()
     217        logfile = os.path.join(
     218            self.app['datacenter'].storage, 'logs', 'students.log')
     219        logcontent = open(logfile).read()
     220        self.assertFalse('saved: fst_sit_results' in logcontent)
    200221
    201222    def test_student_access(self):
Note: See TracChangeset for help on using the changeset viewer.