- Timestamp:
- 31 Aug 2013, 08:19:05 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.fceokene/trunk/src/waeup/fceokene/applicants/tests/test_browser.py
r9943 r10570 63 63 self.beccontainer.title = u'This is the bec2011 container' 64 64 self.app['applicants']['bec2011'] = self.beccontainer 65 66 65 delta = datetime.timedelta(days=10) 67 66 self.beccontainer.startdate = datetime.datetime.now(pytz.utc) - delta 68 67 self.beccontainer.enddate = datetime.datetime.now(pytz.utc) + delta 68 69 # Add ug applicants container 70 self.putmecontainer = ApplicantsContainer() 71 self.putmecontainer.mode = 'create' 72 self.putmecontainer.code = u'putme2011' 73 self.putmecontainer.prefix = u'putme' 74 self.putmecontainer.application_category = u'bec' # doesn't matter 75 self.putmecontainer.year = 2011 76 self.putmecontainer.application_fee = 300.0 77 self.putmecontainer.title = u'This is the putme2011 container' 78 self.app['applicants']['putme2011'] = self.putmecontainer 79 delta = datetime.timedelta(days=10) 80 self.putmecontainer.startdate = datetime.datetime.now(pytz.utc) - delta 81 self.putmecontainer.enddate = datetime.datetime.now(pytz.utc) + delta 69 82 70 83 # Populate university … … 91 104 % self.becapplication_number) 92 105 106 putmeapplicant = createObject(u'waeup.Applicant') 107 putmeapplicant.firstname = u'Anna' 108 putmeapplicant.lastname = u'Post' 109 self.app['applicants']['putme2011'].addApplicant(putmeapplicant) 110 self.putmeapplication_number = putmeapplicant.application_number 111 self.putmeapplicant = self.app['applicants']['putme2011'][ 112 self.putmeapplication_number] 113 self.putmeapplicant_path = ('http://localhost/app/applicants/putme2011/%s' 114 % self.putmeapplication_number) 115 93 116 self.browser = Browser() 94 117 self.browser.handleErrors = False … … 110 133 self.browser.getControl(name="form.email").value = 'xx@yy.zz' 111 134 112 def test_manage_and_view_ applicant(self):135 def test_manage_and_view_bec_applicant(self): 113 136 # Managers can manage bec applicants. 114 137 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') … … 125 148 self.assertEqual(self.browser.headers['Status'], '200 Ok') 126 149 return 150 151 def test_manage_and_view_putme_applicant(self): 152 # Managers can manage bec applicants. 153 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 154 self.browser.open(self.putmeapplicant_path) 155 self.assertEqual(self.browser.headers['Status'], '200 Ok') 156 self.assertTrue("'O' Level" in self.browser.contents) 157 self.browser.open(self.putmeapplicant_path + '/manage') 158 self.assertEqual(self.browser.headers['Status'], '200 Ok') 159 self.assertTrue("'O' Level" in self.browser.contents) 160 self.browser.open(self.putmeapplicant_path + '/edit') 161 self.assertEqual(self.browser.headers['Status'], '200 Ok') 162 self.assertTrue("'O' Level" in self.browser.contents) 163 self.browser.open(self.putmeapplicant_path + '/application_slip.pdf') 164 self.assertEqual(self.browser.headers['Status'], '200 Ok') 165 return
Note: See TracChangeset for help on using the changeset viewer.