- Timestamp:
- 4 Nov 2013, 16:22:35 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/tests/test_browser.py
r10692 r10695 348 348 return 349 349 350 def test_ pdf_slips(self):350 def test_admission_pdf_slips(self): 351 351 # Login 352 352 self.browser.open(self.login_path) … … 367 367 self.assertRaises( 368 368 LinkNotFoundError, self.browser.getLink, 'Download admission notification') 369 self.browser.open(self.student_path , 'admission_notification.pdf')370 self.assert False('Not allowed' in self.browser.contents)369 self.browser.open(self.student_path + '/admission_notification.pdf') 370 self.assertTrue('Not allowed' in self.browser.contents) 371 371 # admission notification 372 372 IWorkflowState(self.student).setState('cleared') … … 382 382 self.assertRaises( 383 383 LinkNotFoundError, self.browser.getLink, 'Download admission letter') 384 self.browser.open(self.student_path , 'admission_slip.pdf')385 self.assert False('Not allowed' in self.browser.contents)386 return 387 388 def test_ course_registration_pdf_slip(self):384 self.browser.open(self.student_path + '/admission_slip.pdf') 385 self.assertTrue('Not allowed' in self.browser.contents) 386 return 387 388 def test_registration_pdf_slips(self): 389 389 # Student cant login if their password is not set 390 390 IWorkflowState(self.student).setState('school fee paid') … … 407 407 open(path, 'wb').write(self.browser.contents) 408 408 print "Sample PDF course_registration_slip.pdf written to %s" % path 409 return 409 410 self.browser.open(self.student_path) 411 self.browser.getLink("Download registration form").click() 412 self.assertEqual(self.browser.headers['Status'], '200 Ok') 413 self.assertEqual(self.browser.headers['Content-Type'], 414 'application/pdf') 415 path = os.path.join(samples_dir(), 'registration_form.pdf') 416 open(path, 'wb').write(self.browser.contents) 417 print "Sample PDF registration_form.pdf written to %s" % path 418 419 return
Note: See TracChangeset for help on using the changeset viewer.