- Timestamp:
- 21 Jan 2017, 16:07:07 (8 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/students/reports/tests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/reports/tests/test_level_report.py
r14419 r14425 20 20 def test_iface(self): 21 21 # ensure we fullfill interface contracts 22 obj = CustomLevelReport('fac1', 'dep1', 2010, 100)22 obj = CustomLevelReport('fac1', 'dep1', 'CERT1', 2010, 100) 23 23 verifyClass(ILevelReport, CustomLevelReport) 24 24 verifyObject(ILevelReport, obj) … … 28 28 # we can get a table with one student 29 29 self.student['studycourse']['100']['Course1'].ca = 0 30 result = get_students('fac1', 'dep1', 2010, 100)30 result = get_students('fac1', 'dep1', 'CERT1', 2010, 100) 31 31 self.assertEqual(result, 32 32 [(u'1234', u'TESTER, Bob', 30, 30, '5.000', 'NIL', '', 30, 30, '5.000', 'Proceed')]) … … 35 35 def test_create_pdf(self): 36 36 self.student['studycourse']['100']['Course1'].ca = 0 37 report = CustomLevelReport('fac1', 'dep1', 2010, 100)37 report = CustomLevelReport('fac1', 'dep1', 'CERT1', 2010, 100) 38 38 result = report.create_pdf('JOB_ID') 39 39 self.assertTrue(result.startswith('%PDF-')) -
main/waeup.aaue/trunk/src/waeup/aaue/students/reports/tests/test_raw_score_report.py
r14399 r14425 11 11 from waeup.aaue.students.reports.raw_score_report import ( 12 12 get_students, RawScoreReport, IRawScoreReport, 13 get_courses _1 as get_courses)13 get_courses) 14 14 from waeup.aaue.testing import FunctionalLayer 15 15 … … 29 29 def test_iface(self): 30 30 # ensure we fullfill interface contracts 31 obj = RawScoreReport('fac1', 'dep1', 2010, 100)31 obj = RawScoreReport('fac1', 'dep1', 'CERT1', 2010, 100) 32 32 verifyClass(IRawScoreReport, RawScoreReport) 33 33 verifyObject(IRawScoreReport, obj) … … 36 36 def test_get_courses(self): 37 37 # we can get a list with one course code 38 result = get_courses('fac1', 'dep1', 2010, 100)38 result = get_courses('fac1', 'dep1', 'CERT1', 2010, 100) 39 39 self.assertEqual(result, [(u'Course1')]) 40 40 return … … 43 43 # we can get a table with one student 44 44 self.student['studycourse']['100']['Course1'].ca = 0 45 course_codes = get_courses('fac1', 'dep1', 2010, 100)46 result = get_students('fac1', 'dep1', 2010, 100, course_codes)45 course_codes = get_courses('fac1', 'dep1', 'CERT1', 2010, 100) 46 result = get_students('fac1', 'dep1', 'CERT1', 2010, 100, course_codes) 47 47 self.assertEqual(result, 48 48 [(u'1234', u'TESTER, Bob', {'Course1': (70, 'A')})]) … … 68 68 self.student.firstname = u'Osahenokese Tessy' 69 69 self.student.lastname = u'Emwinyomwanru' 70 report = RawScoreReport('fac1', 'dep1', 2011, 200)70 report = RawScoreReport('fac1', 'dep1', 'CERT1', 2011, 200) 71 71 result = report.create_pdf('JOB_ID') 72 72 self.assertTrue(result.startswith('%PDF-')) -
main/waeup.aaue/trunk/src/waeup/aaue/students/reports/tests/test_session_results_presentation.py
r14393 r14425 23 23 def test_iface(self): 24 24 # ensure we fullfill interface contracts 25 obj = CustomSessionResultsPresentation('fac1', 'dep1', 2010, 100)25 obj = CustomSessionResultsPresentation('fac1', 'dep1', 'CERT1', 2010, 100) 26 26 verifyClass(ISessionResultsPresentation, CustomSessionResultsPresentation) 27 27 verifyObject(ISessionResultsPresentation, obj) … … 29 29 30 30 def test_get_students(self): 31 result = get_students('fac1', 'dep1', 2010, 100)31 result = get_students('fac1', 'dep1', 'CERT1', 2010, 100) 32 32 self.assertEqual(result, 33 33 [[(u'E1000000', u'1234', u'TESTER, Bob')], [], [], [], [], [], []]) 34 34 self.student['studycourse']['100']['Course1'].score = 60 35 35 self.student['studycourse']['100']['Course1'].ca = 10 36 result = get_students('fac1', 'dep1', 2010, 100)36 result = get_students('fac1', 'dep1', 'CERT1', 2010, 100) 37 37 self.assertEqual(result, 38 38 [[], [], [], [], [], [(u'E1000000', u'1234', u'TESTER, Bob')], []]) … … 41 41 42 42 def test_create_pdf(self): 43 report = CustomSessionResultsPresentation('fac1', 'dep1', 2010, 100)43 report = CustomSessionResultsPresentation('fac1', 'dep1', 'CERT1', 2010, 100) 44 44 result = report.create_pdf('JOB_ID') 45 45 self.assertTrue(result.startswith('%PDF-'))
Note: See TracChangeset for help on using the changeset viewer.