Changeset 12633 for main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests
- Timestamp:
- 27 Feb 2015, 17:39:46 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/sample_contract_data.csv
r12580 r12633 1 class_name,contract_id,reg_number,product_object,document_object,product_options,tc_dict,title 2 SampleContract,c3,1,SAM,DOC1,"[('Base Fee', '800.6', 'USD')]",{'en':'Hello World'},Nice Contract 3 SampleContract,c4,2,SAM,DOC1,[], {},4 SampleContract,c5,3,SAM,DOC1,[], {},5 SampleContract,,1,SAM,DOC1,[], {},6 SampleContract,c5,2,SAM,DOC1,[], {},7 SampleContract,c6,3,SAM,NONEXISTENT,[], {},8 SampleContract,c7,3,NONEXISTENT,DOC1,[], {},1 class_name,contract_id,reg_number,product_object,document_object,product_options,tc_dict,title,valid_from,valid_to 2 SampleContract,c3,1,SAM,DOC1,"[('Base Fee', '800.6', 'USD')]",{'en':'Hello World'},Nice Contract,2014-06-25#,2015-06-25# 3 SampleContract,c4,2,SAM,DOC1,[],,,, 4 SampleContract,c5,3,SAM,DOC1,[],,,, 5 SampleContract,,1,SAM,DOC1,[],,,, 6 SampleContract,c5,2,SAM,DOC1,[],,,, 7 SampleContract,c6,3,SAM,NONEXISTENT,[],,,, 8 SampleContract,c7,3,NONEXISTENT,DOC1,[],,,, -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_batching.py
r12580 r12633 158 158 contract.product_options = self.product.options 159 159 contract.tc_dict = {'en': u'Hello world'} 160 contract.valid_from = datetime.date(2014, 2, 4) 161 contract.valid_to = datetime.date(2014, 12, 4) 162 160 163 customer['contracts'].addContract(contract) 161 164 self.contract = contract … … 498 501 fail_file = open(fail_file).read() 499 502 self.assertEqual(fail_file, 500 'reg_number, contract_id,title,class_name,product_object,tc_dict,document_object,product_options,--ERRORS--\r\n'501 '2, c5,,SampleContract,SAM,{},DOC1,[],This object already exists. Skipping.\r\n'502 '3, c6,,SampleContract,SAM,{},NONEXISTENT,[],document_object: Invalid value\r\n'503 '3, c7,,SampleContract,NONEXISTENT,{},DOC1,[],product_object: Invalid value\r\n'503 'reg_number,valid_from,contract_id,title,class_name,valid_to,product_object,tc_dict,document_object,product_options,--ERRORS--\r\n' 504 '2,,c5,,SampleContract,,SAM,,DOC1,[],This object already exists. Skipping.\r\n' 505 '3,,c6,,SampleContract,,SAM,,NONEXISTENT,[],document_object: Invalid value\r\n' 506 '3,,c7,,SampleContract,,NONEXISTENT,,DOC1,[],product_object: Invalid value\r\n' 504 507 ) 505 508 contract = self.processor.getEntry(dict(reg_number='1', … … 512 515 self.assertEqual(contract.product_options[0].currency, 'USD') 513 516 self.assertEqual(contract.contract_id, 'c3') 514 self.assertEqual(contract.tc_dict, u"{'en':'Hello World'}") 517 self.assertEqual(contract.title, u'Nice Contract') 518 self.assertEqual(contract.tc_dict, {'en':'Hello World'}) 515 519 contract = self.processor.getEntry(dict(reg_number='3', 516 520 contract_id='c5'), self.app) … … 523 527 self.assertTrue( 524 528 'INFO - system - Customer Sample Contract Processor - sample_contract_data - ' 525 'X666666 - %s - updated: title=, product_object=SAM, tc_dict={}, document_object=DOC1, '529 'X666666 - %s - updated: valid_from=, title=, valid_to=, product_object=SAM, tc_dict=, document_object=DOC1, ' 526 530 'product_options=[]' % conid 527 531 in logcontent) -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_export.py
r12580 r12633 257 257 'class_name,comment,contract_category,contract_id,document_object,' 258 258 'history,last_product_id,' 259 'product_object,product_options,state,tc_dict,title,user_id\r\n' 260 261 'SampleContract,,sample,CON1,,[],,,[],,{},,\r\n' 259 'product_object,product_options,state,tc_dict,title,user_id,' 260 'valid_from,valid_to\r\n' 261 262 'SampleContract,,sample,CON1,,[],,,[],,{},,,,\r\n' 262 263 ) 263 264 return … … 273 274 'class_name,comment,contract_category,contract_id,document_object,' 274 275 'history,last_product_id,' 275 'product_object,product_options,state,tc_dict,title,user_id\r\n' 276 'product_object,product_options,state,tc_dict,title,user_id,' 277 'valid_from,valid_to\r\n' 276 278 277 279 'SampleContract,,sample,CON1,DOC1,[u\'2014-12-04 12:10:46 UTC - ' 278 280 'Contract created by system\'],,' 279 281 'SAM,"[(u\'Base Fee\', u\'800.6\', u\'USD\')]",' 280 'created,{\'en\': u\'Hello world\'},,A111111\r\n', 282 'created,{\'en\': u\'Hello world\'},,A111111,' 283 '2014-02-04#,2014-12-04#\r\n', 281 284 result 282 285 ) … … 293 296 'class_name,comment,contract_category,contract_id,document_object,' 294 297 'history,last_product_id,' 295 'product_object,product_options,state,tc_dict,title,user_id\r\n' 298 'product_object,product_options,state,tc_dict,title,user_id,' 299 'valid_from,valid_to\r\n' 296 300 297 301 'SampleContract,,sample,CON1,DOC1,[u\'2014-12-04 12:10:46 UTC - ' 298 302 'Contract created by system\'],,' 299 303 'SAM,"[(u\'Base Fee\', u\'800.6\', u\'USD\')]",' 300 'created,{\'en\': u\'Hello world\'},,A111111\r\n', 304 'created,{\'en\': u\'Hello world\'},,A111111,' 305 '2014-02-04#,2014-12-04#\r\n', 301 306 result 302 307 ) … … 313 318 'class_name,comment,contract_category,contract_id,document_object,' 314 319 'history,last_product_id,' 315 'product_object,product_options,state,tc_dict,title,user_id\r\n' 320 'product_object,product_options,state,tc_dict,title,user_id,' 321 'valid_from,valid_to\r\n' 316 322 317 323 'SampleContract,,sample,CON1,DOC1,[u\'2014-12-04 12:10:46 UTC - ' 318 324 'Contract created by system\'],,' 319 325 'SAM,"[(u\'Base Fee\', u\'800.6\', u\'USD\')]",' 320 'created,{\'en\': u\'Hello world\'},,A111111\r\n', 321 result 322 ) 323 return 324 326 'created,{\'en\': u\'Hello world\'},,A111111,' 327 '2014-02-04#,2014-12-04#\r\n', 328 result 329 ) 330 return 331
Note: See TracChangeset for help on using the changeset viewer.