Changeset 15625 for main/waeup.aaue/trunk
- Timestamp:
- 30 Sep 2019, 12:26:59 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r15429 r15625 460 460 self.assertFalse('No student found' in self.browser.contents) 461 461 self.assertTrue('TESTER, Anna' in self.browser.contents) 462 463 def test_lecturers_can_download_attendance_sheet(self): 464 # A course ticket slip can be downloaded 465 self.course.title = (u'Lorem ipsum dolor sit amet, consectetur adipisici, ' 466 u'sed eiusmod tempor incidunt ut labore et dolore') 467 self.student.firstname = u'Emmanuella Woyengifigha Mercy Onosemudiana' 468 self.student.lastname = u'OYAKEMIEGBEGHA' 469 self.student.matric_number = u'CMS/FBM/NSG/17/38186' 470 self.login_as_lecturer() 471 pdf_url = '%s/attendance.pdf' % self.course_url 472 self.browser.open(pdf_url) 473 self.assertEqual(self.browser.headers['Status'], '200 Ok') 474 self.assertEqual( 475 self.browser.headers['Content-Type'], 'application/pdf') 476 path = os.path.join(samples_dir(), 'attendance.pdf') 477 open(path, 'wb').write(self.browser.contents) 478 print "Sample PDF attendance.pdf written to %s" % path 462 479 463 480 def test_transcripts(self):
Note: See TracChangeset for help on using the changeset viewer.