- Timestamp:
- 2 Jan 2015, 10:29:24 (10 years ago)
- Location:
- main/ikobacustom.skeleton/trunk/src/ikobacustom/skeleton
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/ikobacustom.skeleton/trunk/src/ikobacustom/skeleton/customers/tests/test_browser.py
r12355 r12367 60 60 customer['documents'].addDocument(document) 61 61 contract = createObject(u'waeup.SkeletonContract') 62 contract.tc_dict = {'en':u'Hello World'} 62 63 customer['contracts'].addContract(contract) 63 64 self.customer = customer … … 161 162 'class_name,contract_category,contract_id,document_object,' 162 163 'history,last_product_id,product_object,product_options,' 163 'state,t itle,user_id\r\n'164 'state,tc_dict,title,user_id\r\n' 164 165 'SkeletonContract,sample,%s,,' 165 166 '[u\'2014-12-21 22:26:00 WAT - Contract created by system\']' 166 ',,,[],created, ,K1000000\r\n'167 ',,,[],created,{\'en\': u\'Hello World\'},,K1000000\r\n' 167 168 % self.contract.contract_id) 168 169 # We can reimport the file if we change the header (user_id -> customer_id) … … 171 172 'class_name,contract_category,contract_id,document_object,' 172 173 'history,last_product_id,product_object,product_options,' 173 'state,t itle,user_id\r\n'174 'state,tc_dict,title,user_id\r\n' 174 175 'SkeletonContract,sample,%s,,' 175 176 '[u\'2014-12-21 22:26:00 WAT - Contract created by system\']' 176 ',,,[],created, ,K1000000\r\n'177 ',,,[],created,{\'en\': u\'Hello World\'},,K1000000\r\n' 177 178 % self.contract.contract_id) 178 179 result = processor.doImport( … … 180 181 ['class_name','contract_category','contract_id','document_object', 181 182 'history','last_product_id','product_object','product_options', 182 'state','t itle','customer_id'],183 'state','tc_dict','title','customer_id'], 183 184 mode='create') 184 185 num, num_fail, finished_path, failed_path = result … … 191 192 ['class_name','contract_category','contract_id','document_object', 192 193 'history','last_product_id','product_object','product_options', 193 'state','t itle','customer_id'],194 'state','tc_dict','title','customer_id'], 194 195 mode='create') 195 196 num_succ, num_fail, finished_path, failed_path = result … … 200 201 ['class_name','contract_category','contract_id','document_object', 201 202 'history','last_product_id','product_object','product_options', 202 'state','t itle','customer_id'],203 'state','tc_dict','title','customer_id'], 203 204 mode='update') 204 205 num_succ, num_fail, finished_path, failed_path = result -
main/ikobacustom.skeleton/trunk/src/ikobacustom/skeleton/products/tests/test_browser.py
r12359 r12367 54 54 self.assertEqual(result, 55 55 'contract_category,contract_title,options,' 56 'product_id,t itle,valid_from,valid_to,users_with_local_roles\r\n'57 'license,,[],LIC, Unnamed,2015-12-04#,,[]\r\n')56 'product_id,terms_and_conditions,title,valid_from,valid_to,users_with_local_roles\r\n' 57 'license,,[],LIC,,Unnamed,2015-12-04#,,[]\r\n') 58 58 # We can import the same file. 59 59 processor = SkeletonProductProcessor() … … 61 61 self.outfile, 62 62 ['contract_category','contract_title', 'options,', 'product_id', 63 't itle','valid_from','valid_to','users_with_local_roles'],63 'terms_and_conditions','title','valid_from','valid_to','users_with_local_roles'], 64 64 mode='create') 65 65 num, num_fail, finished_path, failed_path = result … … 72 72 self.outfile, 73 73 ['contract_category','contract_title', 'options,', 'product_id', 74 't itle','valid_from','valid_to','users_with_local_roles'],74 'terms_and_conditions','title','valid_from','valid_to','users_with_local_roles'], 75 75 mode='create') 76 76 num, num_fail, finished_path, failed_path = result … … 81 81 self.outfile, 82 82 ['contract_category','contract_title', 'options,', 'product_id', 83 't itle','valid_from','valid_to','users_with_local_roles'],83 'terms_and_conditions','title','valid_from','valid_to','users_with_local_roles'], 84 84 mode='update') 85 85 num, num_fail, finished_path, failed_path = result
Note: See TracChangeset for help on using the changeset viewer.