Changeset 10016 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 11 Mar 2013, 11:47:20 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r10001 r10016 2929 2929 return 2930 2930 if session == 'all': 2931 session =None2931 session = None 2932 2932 if level == 'all': 2933 2933 level = None -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py
r10014 r10016 905 905 self.assertEqual(courseticket.passmark, 40) 906 906 self.assertEqual(courseticket.semester, 1) 907 self.assertEqual(courseticket.level, 100) 908 self.assertEqual(courseticket.level_session, 2008) 907 909 shutil.rmtree(os.path.dirname(fin_file)) 908 910 logcontent = open(self.logfile).read() … … 914 916 'mandatory=False, score=3' 915 917 in logcontent) 918 919 # The catalog has been updated 920 cat = queryUtility(ICatalog, name='coursetickets_catalog') 921 results = list( 922 cat.searchResults( 923 level=(100, 100))) 924 self.assertEqual(len(results),3) 916 925 917 926 def test_import_update(self): -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r9938 r10016 2976 2976 2977 2977 def test_course_export_coursetickets(self): 2978 # We add study level 100 to the student's studycourse 2979 studylevel = StudentStudyLevel() 2980 studylevel.level = 100 2981 studylevel.level_session = 2004 2982 self.student['studycourse'].addStudentStudyLevel( 2983 self.certificate,studylevel) 2978 2984 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 2979 2985 course1_path = 'http://localhost/app/faculties/fac1/dep1/courses/COURSE1' … … 2985 2991 self.browser.getControl(name="level").value = ['100'] 2986 2992 self.browser.getControl("Create CSV file").click() 2987 2988 2993 # When the job is finished and we reload the page... 2989 2994 job_id = self.wait_for_export_job_completed() … … 2996 3001 'filename="WAeUP.Kofa_coursetickets_%s.csv' % job_id in 2997 3002 self.browser.headers['content-disposition']) 3003 # ... and contains the course ticket COURSE1 3004 self.assertEqual(self.browser.contents, 3005 'automatic,carry_over,code,credits,dcode,fcode,level,' 3006 'level_session,mandatory,passmark,score,semester,title,' 3007 'student_id,certcode\r\n1,0,COURSE1,10,dep1,fac1,100,2004,1,40,,1,' 3008 'Unnamed Course,K1000000,CERT1\r\n') 3009 2998 3010 self.assertEqual(len(self.app['datacenter'].running_exports), 1) 2999 3011 job_id = self.app['datacenter'].running_exports[0][0] 3000 # ... anddiscarded3012 # Thew job can be discarded 3001 3013 self.browser.open(course1_path + '/exports') 3002 3014 self.browser.getControl("Discard").click()
Note: See TracChangeset for help on using the changeset viewer.