Changeset 12078
- Timestamp:
- 28 Nov 2014, 08:24:49 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/products/interfaces.py
r12064 r12078 23 23 from waeup.ikoba.interfaces import MessageFactory as _ 24 24 25 class AppCatSource(ContextualDictSourceFactoryBase): 26 """A application category source delivers all application categories 27 provided in the portal. 28 """ 29 #: name of dict to deliver from kofa utils. 30 DICT_NAME = 'APP_CATS_DICT' 25 31 26 32 class IProductsContainer(IIkobaObject): … … 48 54 default = u'Unnamed', 49 55 ) 56 57 application_category = schema.Choice( 58 title = _(u'Application Category'), 59 source = AppCatSource(), 60 default = u'license', 61 required = True, 62 ) -
main/waeup.ikoba/trunk/src/waeup/ikoba/products/tests/sample_product_data.csv
r12073 r12078 1 product_id,title 2 ABC,ABC title 3 CDE,CDE title 4 EFG,EFG title 5 ABC,Duplicate product 1 product_id,title,application_category 2 ABC,ABC title,license 3 CDE,CDE title,license 4 EFG,EFG title,license 5 ABC,Duplicate product,license -
main/waeup.ikoba/trunk/src/waeup/ikoba/products/tests/test_batching.py
r12077 r12078 164 164 self.assertTrue( 165 165 'INFO - system - Product Processor - sample_product_data - ' 166 'EFG - updated: product_id=EFG, title=EFG title\n' 166 'EFG - updated: product_id=EFG, title=EFG title, ' 167 'application_category=license\n' 167 168 in logcontent) 168 169 failcontent = open(fail_file).read() -
main/waeup.ikoba/trunk/src/waeup/ikoba/products/tests/test_export.py
r12077 r12078 62 62 result = open(self.outfile, 'rb').read() 63 63 self.assertTrue( 64 'product_id,title,users_with_local_roles\r\nLIC,Unnamed,"' 65 '[{\'user_name\': u\'john\', \'local_role\': u\'johnsrole\'}]"\r\n' 64 'application_category,product_id,title,users_with_local_roles\r\n' 65 'license,LIC,Unnamed,"[{\'user_name\': u\'john\', \'local_role\': ' 66 'u\'johnsrole\'}]"\r\n' 66 67 in result 67 68 ) … … 74 75 result = open(self.outfile, 'rb').read() 75 76 self.assertTrue( 76 'product_id,title,users_with_local_roles\r\nLIC,Unnamed,"' 77 '[{\'user_name\': u\'john\', \'local_role\': u\'johnsrole\'}]"\r\n' 77 'application_category,product_id,title,users_with_local_roles\r\n' 78 'license,LIC,Unnamed,"[{\'user_name\': u\'john\', \'local_role\': ' 79 'u\'johnsrole\'}]"\r\n' 78 80 in result 79 81 ) -
main/waeup.ikoba/trunk/src/waeup/ikoba/utils/utils.py
r12060 r12078 101 101 def sorted_phone_prefixes(cls, data=INT_PHONE_PREFIXES, request=None): 102 102 return sorted_phone_prefixes(data, request) 103 104 APP_CATS_DICT = { 105 'license': 'License', 106 'no': 'no application', 107 } 103 108 104 109 EXAM_SUBJECTS_DICT = {
Note: See TracChangeset for help on using the changeset viewer.