Changeset 12488 for main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/products
- Timestamp:
- 18 Jan 2015, 16:06:01 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/products/tests/test_browser.py
r12371 r12488 39 39 def setup_for_export(self): 40 40 product = PCNProduct() 41 product.product_id = u'LIC' 41 product.product_id = u'RON' 42 product.contract_category = u'ron' 42 43 product.valid_from = datetime.date(2015, 12, 4) 43 44 self.app['products'][product.product_id] = self.product = product … … 54 55 self.assertEqual(result, 55 56 'contract_category,contract_title,options,' 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') 57 'product_id,terms_and_conditions,title,valid_from,valid_to,' 58 'users_with_local_roles\r\n' 59 'ron,,[],RON,,Unnamed,2015-12-04#,,[]\r\n') 58 60 # We can import the same file. 59 61 processor = PCNProductProcessor() … … 61 63 self.outfile, 62 64 ['contract_category','contract_title', 'options,', 'product_id', 63 'terms_and_conditions','title','valid_from','valid_to','users_with_local_roles'], 65 'terms_and_conditions','title','valid_from','valid_to', 66 'users_with_local_roles'], 64 67 mode='create') 65 68 num, num_fail, finished_path, failed_path = result … … 68 71 self.assertEqual(num_fail,1) 69 72 # We remove the original product. 70 del self.app['products'][' LIC']73 del self.app['products']['RON'] 71 74 result = processor.doImport( 72 75 self.outfile, 73 76 ['contract_category','contract_title', 'options,', 'product_id', 74 'terms_and_conditions','title','valid_from','valid_to','users_with_local_roles'], 77 'terms_and_conditions','title','valid_from','valid_to', 78 'users_with_local_roles'], 75 79 mode='create') 76 80 num, num_fail, finished_path, failed_path = result … … 81 85 self.outfile, 82 86 ['contract_category','contract_title', 'options,', 'product_id', 83 'terms_and_conditions','title','valid_from','valid_to','users_with_local_roles'], 87 'terms_and_conditions','title','valid_from','valid_to', 88 'users_with_local_roles'], 84 89 mode='update') 85 90 num, num_fail, finished_path, failed_path = result
Note: See TracChangeset for help on using the changeset viewer.