Changeset 13012 for main/waeup.kofa/trunk/src/waeup/kofa
- Timestamp:
- 28 May 2015, 13:55:06 (10 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/payments/interfaces.py
r13005 r13012 47 47 """ 48 48 p_id = Attribute('Payment identifier') 49 created_online = Attribute('True if not imported')50 49 51 50 p_category = schema.Choice( -
main/waeup.kofa/trunk/src/waeup/kofa/payments/payment.py
r13005 r13012 44 44 logger_format_str = '"%(asctime)s","%(user)s",%(message)s' 45 45 46 created_online = False 46 #def logger_info(self, comment=None): 47 # """Get the logger's info method. 48 # """ 49 # self.logger.info('%s' % comment) 50 # return 47 51 48 52 def __init__(self): -
main/waeup.kofa/trunk/src/waeup/kofa/payments/tests.py
r13005 r13012 26 26 from waeup.kofa.testing import (FunctionalLayer, FunctionalTestCase) 27 27 28 class Payments TestCase(FunctionalTestCase):28 class PaymentsContainerTestCase(FunctionalTestCase): 29 29 30 30 layer = FunctionalLayer … … 57 57 self.assertRaises( 58 58 NotImplementedError, container.clear) 59 # created_online is always False60 payment = OnlinePayment()61 self.assertEqual(payment.created_online, False)62 return -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r13005 r13012 1741 1741 self.flash(error, type="danger") 1742 1742 return 1743 payment.created_online = True1744 1743 self.context[payment.p_id] = payment 1745 1744 self.flash(_('Payment ticket created.')) … … 1781 1780 self.flash(error, type="danger") 1782 1781 return 1783 payment.created_online = True1784 1782 self.context[payment.p_id] = payment 1785 1783 self.flash(_('Payment ticket created.')) -
main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py
r13003 r13012 739 739 """ 740 740 bed = Attribute('The bed object.') 741 booking_date = Attribute('Date of booking the bed') 742 743 display_coordinates = schema.TextLine( 744 title = _(u'Allocated Bed'), 745 required = False, 746 readonly = True, 747 ) 741 748 742 749 bed_coordinates = schema.TextLine( … … 746 753 ) 747 754 748 display_coordinates = schema.TextLine(749 title = _(u'Allocated Bed'),750 required = False,751 readonly = True,752 )753 754 755 bed_type = schema.TextLine( 755 756 title = _(u'Requested Bed Type'), … … 778 779 779 780 def getSessionString(): 780 """Returns the title of academic_sessions_vocab term. 781 """Returns the title of academic_sessions_vocab term of the session 782 when the bed was booked. 781 783 """ 782 784 -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r13005 r13012 904 904 self.browser.contents) 905 905 self.assertEqual(self.student['payments'][value].amount_auth, 40000.0) 906 self.assertEqual(self.student['payments'][value].created_online, True)907 906 payment_url = self.browser.url 908 907 logfile = os.path.join( -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py
r13005 r13012 744 744 self.assertEqual( 745 745 result, 746 'ac,amount_auth,creat ed_online,creation_date,p_category,p_current,p_id,'746 'ac,amount_auth,creation_date,p_category,p_current,p_id,' 747 747 'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,' 748 748 'r_code,r_desc,student_id,state,current_session\r\n' 749 749 750 ',0.0, 0,2012-04-01 13:12:01#,,1,,,,,unpaid,,0.0,,,,,\r\n'750 ',0.0,2012-04-01 13:12:01#,,1,,,,,unpaid,,0.0,,,,,\r\n' 751 751 ) 752 752 return … … 762 762 self.assertEqual( 763 763 result, 764 'ac,amount_auth,creat ed_online,creation_date,p_category,p_current,p_id,'764 'ac,amount_auth,creation_date,p_category,p_current,p_id,' 765 765 'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,' 766 766 'r_code,r_desc,student_id,state,current_session\r\n' 767 767 768 '666,12.12, 0,2012-04-01 13:12:01#,schoolfee,1,my-id,'768 '666,12.12,2012-04-01 13:12:01#,schoolfee,1,my-id,' 769 769 'p-item,100,2012,paid,2012-04-01 14:12:01#,12.12,' 770 770 'r-code,,A111111,created,2012\r\n' … … 781 781 self.assertEqual( 782 782 result, 783 'ac,amount_auth,creat ed_online,creation_date,p_category,p_current,p_id,'783 'ac,amount_auth,creation_date,p_category,p_current,p_id,' 784 784 'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,' 785 785 'r_code,r_desc,student_id,state,current_session\r\n' 786 786 787 '666,12.12, 0,2012-04-01 13:12:01#,schoolfee,1,my-id,'787 '666,12.12,2012-04-01 13:12:01#,schoolfee,1,my-id,' 788 788 'p-item,100,2012,paid,2012-04-01 14:12:01#,12.12,' 789 789 'r-code,,A111111,created,2012\r\n' … … 800 800 self.assertEqual( 801 801 result, 802 'ac,amount_auth,creat ed_online,creation_date,p_category,p_current,p_id,'802 'ac,amount_auth,creation_date,p_category,p_current,p_id,' 803 803 'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,' 804 804 'r_code,r_desc,student_id,state,current_session\r\n' 805 805 806 '666,12.12, 0,2012-04-01 13:12:01#,schoolfee,1,my-id,'806 '666,12.12,2012-04-01 13:12:01#,schoolfee,1,my-id,' 807 807 'p-item,100,2012,paid,2012-04-01 14:12:01#,12.12,' 808 808 'r-code,,A111111,created,2012\r\n' … … 822 822 self.assertEqual( 823 823 result, 824 'ac,amount_auth,creat ed_online,creation_date,p_category,p_current,p_id,'824 'ac,amount_auth,creation_date,p_category,p_current,p_id,' 825 825 'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,' 826 826 'r_code,r_desc,student_id,state,current_session\r\n' 827 827 828 '666,12.12, 0,2012-04-01 13:12:01#,schoolfee,1,my-id,'828 '666,12.12,2012-04-01 13:12:01#,schoolfee,1,my-id,' 829 829 'p-item,100,2012,paid,2012-04-01 14:12:01#,12.12,' 830 830 'r-code,,A111111,created,2012\r\n' … … 857 857 self.assertEqual( 858 858 result, 859 'ac,amount_auth,creat ed_online,creation_date,p_category,p_current,p_id,'859 'ac,amount_auth,creation_date,p_category,p_current,p_id,' 860 860 'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,' 861 861 'r_code,r_desc,student_id,state,current_session\r\n' 862 862 863 '666,12.12, 0,2012-04-01 13:12:01#,schoolfee,1,my-id,'863 '666,12.12,2012-04-01 13:12:01#,schoolfee,1,my-id,' 864 864 'p-item,100,2012,paid,2012-04-01 14:12:01#,12.12,' 865 865 'r-code,,A111111,created,2012\r\n' … … 873 873 self.assertEqual( 874 874 result, 875 'ac,amount_auth,creat ed_online,creation_date,p_category,p_current,p_id,'875 'ac,amount_auth,creation_date,p_category,p_current,p_id,' 876 876 'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,' 877 877 'r_code,r_desc,student_id,state,current_session\r\n' … … 884 884 self.assertEqual( 885 885 result, 886 'ac,amount_auth,creat ed_online,creation_date,p_category,p_current,p_id,'886 'ac,amount_auth,creation_date,p_category,p_current,p_id,' 887 887 'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,' 888 888 'r_code,r_desc,student_id,state,current_session\r\n' … … 917 917 self.assertEqual( 918 918 result, 919 'ac,amount_auth,creat ed_online,creation_date,p_category,p_current,p_id,'919 'ac,amount_auth,creation_date,p_category,p_current,p_id,' 920 920 'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,' 921 921 'r_code,r_desc,student_id,state,current_session\r\n' … … 927 927 self.assertEqual( 928 928 result, 929 'ac,amount_auth,creat ed_online,creation_date,p_category,p_current,p_id,'929 'ac,amount_auth,creation_date,p_category,p_current,p_id,' 930 930 'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,' 931 931 'r_code,r_desc,student_id,state,current_session\r\n' 932 932 933 '666,12.12, 0,2012-04-01 13:12:01#,schoolfee,1,my-id,'933 '666,12.12,2012-04-01 13:12:01#,schoolfee,1,my-id,' 934 934 'p-item,100,2012,unpaid,2012-04-01 14:12:01#,12.12,' 935 935 'r-code,,A111111,created,2012\r\n' … … 955 955 self.assertEqual( 956 956 result, 957 'ac,amount_auth,creat ed_online,creation_date,p_category,p_current,p_id,p_item,'957 'ac,amount_auth,creation_date,p_category,p_current,p_id,p_item,' 958 958 'p_level,p_session,p_state,payment_date,r_amount_approved,r_code,' 959 959 'r_desc,student_id,matric_number,reg_number,firstname,middlename,lastname,' 960 960 'state,current_session,entry_session,entry_mode,faccode,depcode,certcode\r\n' 961 961 962 '666,12.12, 0,2012-04-01 13:12:01#,schoolfee,1,my-id,p-item,100,2012,'962 '666,12.12,2012-04-01 13:12:01#,schoolfee,1,my-id,p-item,100,2012,' 963 963 'paid,2012-04-01 14:12:01#,12.12,r-code,,A111111,234,123,' 964 964 'Anna,M.,Tester,created,2012,2010,ug_ft,NA,NA,CERT1\r\n'
Note: See TracChangeset for help on using the changeset viewer.