- Timestamp:
- 22 Oct 2012, 14:37:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/tests.py
r9370 r9387 16 16 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 17 ## 18 import grok 18 19 from hurry.workflow.interfaces import IWorkflowState 20 from zope.component import createObject 21 from zope.event import notify 22 from waeup.kofa.university.faculty import Faculty 23 from waeup.kofa.university.department import Department 19 24 from waeup.kofa.students.tests.test_browser import StudentsFullSetup 20 25 from waeup.kofa.applicants.tests.test_browser import ApplicantsFullSetup … … 46 51 def setUp(self): 47 52 super(InterswitchTestsStudents, self).setUp() 53 54 # Create at least one Kwarapoly faculty 55 self.app['faculties']['CPGS'] = Faculty(code='CPGS') 56 self.app['faculties']['CPGS']['dep1'] = Department(code='dep1') 57 self.certificate2 = createObject('waeup.Certificate') 58 self.certificate2.code = u'CERT2' 59 self.certificate2.application_category = 'basic' 60 self.certificate2.study_mode = 'nd_ft' 61 self.certificate2.start_level = 100 62 self.certificate2.end_level = 300 63 self.app['faculties']['CPGS']['dep1'].certificates.addCertificate( 64 self.certificate2) 65 # Set study course attributes of test student 66 self.student['studycourse'].certificate = self.certificate2 67 self.student['studycourse'].current_session = 2004 68 self.student['studycourse'].entry_session = 2004 69 self.student['studycourse'].current_verdict = 'A' 70 self.student['studycourse'].current_level = 100 71 # Update the catalog 72 notify(grok.ObjectModifiedEvent(self.student)) 73 48 74 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 49 75 self.browser.open(self.payments_path) … … 75 101 self.browser.contents) 76 102 self.assertMatches( 77 '...<span> 12495.0</span>...',103 '...<span>60980.0</span>...', 78 104 self.browser.contents) 79 105 self.payment_url = self.browser.url … … 84 110 self.browser.contents) 85 111 self.assertMatches( 86 '...<input type="hidden" name="amount" value=" 1249500.0" />...',87 self.browser.contents) 88 self.assertMatches( 89 '...item_name="schoolfee" item_amt=" 1044500" bank_id="117" acct_num="6216801033"...',90 self.browser.contents) 91 self.assertMatches( 92 '...item_name=" KwaraPoly Split" item_amt="140000" bank_id="117" acct_num="6216801058"...',93 self.browser.contents) 94 self.assertMatches( 95 '...item_name="BT Education" item_amt=" 50000" bank_id="31" acct_num="0026781725"...',112 '...<input type="hidden" name="amount" value="6098000.0" />...', 113 self.browser.contents) 114 self.assertMatches( 115 '...item_name="schoolfee" item_amt="5768000" bank_id="120" acct_num="1771180233"...', 116 self.browser.contents) 117 self.assertMatches( 118 '...item_name="Dalash" item_amt="180000" bank_id="117" acct_num="1013196791"...', 119 self.browser.contents) 120 self.assertMatches( 121 '...item_name="BT Education" item_amt="120000" bank_id="117" acct_num="1010764827"...', 96 122 self.browser.contents) 97 123
Note: See TracChangeset for help on using the changeset viewer.