Changeset 14206 for main/waeup.aaue/trunk/src/waeup/aaue/students/tests
- Timestamp:
- 29 Sep 2016, 08:54:32 (8 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/students/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r14165 r14206 43 43 44 44 45 class StudentProcessorTest(FunctionalTestCase):46 """Perform some batching tests.47 """48 49 layer = FunctionalLayer50 51 def setUp(self):52 super(StudentProcessorTest, self).setUp()53 # Setup a sample site for each test54 app = University()55 self.dc_root = tempfile.mkdtemp()56 app['datacenter'].setStoragePath(self.dc_root)57 58 # Prepopulate the ZODB...59 self.getRootFolder()['app'] = app60 # we add the site immediately after creation to the61 # ZODB. Catalogs and other local utilities are not setup62 # before that step.63 self.app = self.getRootFolder()['app']64 # Set site here. Some of the following setup code might need65 # to access grok.getSite() and should get our new app then66 setSite(app)67 68 69 def tearDown(self):70 super(StudentProcessorTest, self).tearDown()71 shutil.rmtree(self.workdir)72 shutil.rmtree(self.dc_root)73 clearSite()74 return75 76 45 UPLOAD_CSV_TEMPLATE = ( 77 46 'matric_number,student_id,display_fullname,level,code,level_session,' … … 144 113 self.assertEqual(self.student['studycourse']['100'].gpa_params[2], 82.0) 145 114 # sgpa = 82 / 23 146 self.assertEqual(self.student['studycourse']['100'].gpa_params[0], 3.565) 115 self.assertEqual( 116 self.student['studycourse']['100'].gpa_params[0], 3.565) 117 # imported gpa values override calculated values 118 studylevel.imported_gpa = 4.3 119 studylevel.imported_cgpa = 5.4 120 self.assertEqual(self.student['studycourse']['100'].gpa_params[0], 4.3) 121 self.assertEqual( 122 self.student['studycourse']['100'].cumulative_params[0], 5.4) 123 self.assertEqual(self.student['studycourse']['100'].gpa, 4.3) 124 self.student['studycourse'].imported_cgpa = 6.6 125 self.assertEqual( 126 self.student['studycourse'].getTranscriptData()[1], 6.6) 147 127 return 148 128 -
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_export.py
r14111 r14206 138 138 self.assertEqual( 139 139 result, 140 'gpa,level,level_session,level_verdict,total_credits,' 140 'gpa,imported_cgpa,imported_gpa,' 141 'level,level_session,level_verdict,total_credits,' 141 142 'total_credits_s1,total_credits_s2,' 142 143 'validated_by,validation_date,' 143 144 'student_id,number_of_tickets,certcode\r\n' 144 '0.0, 100,2012,A,100,,,,,A111111,1,CERT1\r\n'145 '0.0,,,100,2012,A,100,,,,,A111111,1,CERT1\r\n' 145 146 ) 146 147 return
Note: See TracChangeset for help on using the changeset viewer.