Changeset 14766 for main/kofacustom.nigeria
- Timestamp:
- 4 Aug 2017, 05:57:09 (7 years ago)
- Location:
- main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/remita
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/remita/tests.py
r14765 r14766 184 184 185 185 @external_test 186 def test_ remita_form(self):186 def test_student_remita_form(self): 187 187 # Manager can access Remita form 188 188 self.browser.getLink("Pay via Remita").click() … … 218 218 self.assertTrue('Successful callback received' in self.browser.contents) 219 219 return 220 221 class RemitaTestsApplicants(ApplicantsFullSetup): 222 """Tests for the Remita payment gateway. 223 """ 224 225 layer = FunctionalLayer 226 227 # successful transaction 228 # (hopefully this transaction remains in the Remita database) 229 #orderId = '3456346346' 230 rrr = u'280007640804' 231 #amount = 1000.0 232 233 def setUp(self): 234 super(RemitaTestsApplicants, self).setUp() 235 configuration = SessionConfiguration() 236 configuration.academic_session = datetime.now().year - 2 237 configuration.remita_enabled = True 238 self.app['configuration'].addSessionConfiguration(configuration) 239 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 240 self.browser.open(self.manage_path) 241 #IWorkflowState(self.student).setState('started') 242 super(RemitaTestsApplicants, self).fill_correct_values() 243 self.applicantscontainer.application_fee = 1000.0 244 self.browser.getControl(name="form.nationality").value = ['NG'] 245 self.browser.getControl(name="transition").value = ['start'] 246 self.browser.getControl("Save").click() 247 self.browser.getControl("Add online").click() 248 self.assertMatches('...ticket created...', 249 self.browser.contents) 250 self.payment = self.applicant.values()[0] 251 self.payment_url = self.browser.url 252 253 @external_test 254 def test_applicant_remita_form(self): 255 # Manager can access Remita form 256 self.browser.getLink("Pay via Remita").click() 257 # The RRR has been retrieved 258 self.assertTrue('<input name="rrr" type="hidden" value="%s">' % self.rrr 259 in self.browser.contents) 260 self.assertEqual(self.payment.r_pay_reference, self.rrr) 261 self.assertEqual(self.payment.r_company, 'remita') 262 # Means of testing end here. 263 return
Note: See TracChangeset for help on using the changeset viewer.