Changeset 12366 for main


Ignore:
Timestamp:
2 Jan 2015, 10:24:02 (10 years ago)
Author:
Henrik Bettermann
Message:

Extend test.

Location:
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/sample_contract_data.csv

    r12342 r12366  
    1 class_name,contract_id,reg_number,product_object,document_object,product_options
    2 SampleContract,c3,1,SAM,DOC1,"[('Base Fee', '800.6', 'USD')]"
    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,[]
     1class_name,contract_id,reg_number,product_object,document_object,product_options,tc_dict
     2SampleContract,c3,1,SAM,DOC1,"[('Base Fee', '800.6', 'USD')]",{'en':'Hello World'}
     3SampleContract,c4,2,SAM,DOC1,[],{}
     4SampleContract,c5,3,SAM,DOC1,[],{}
     5SampleContract,,1,SAM,DOC1,[],{}
     6SampleContract,c5,2,SAM,DOC1,[],{}
     7SampleContract,c6,3,SAM,NONEXISTENT,[],{}
     8SampleContract,c7,3,NONEXISTENT,DOC1,[],{}
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_batching.py

    r12364 r12366  
    492492        fail_file = open(fail_file).read()
    493493        self.assertEqual(fail_file,
    494             'reg_number,contract_id,class_name,product_object,document_object,product_options,--ERRORS--\r\n'
    495             '2,c5,SampleContract,SAM,DOC1,[],This object already exists. Skipping.\r\n'
    496             '3,c6,SampleContract,SAM,NONEXISTENT,[],document_object: Invalid value\r\n'
    497             '3,c7,SampleContract,NONEXISTENT,DOC1,[],product_object: Invalid value\r\n'
     494            'reg_number,contract_id,class_name,product_object,tc_dict,document_object,product_options,--ERRORS--\r\n'
     495            '2,c5,SampleContract,SAM,{},DOC1,[],This object already exists. Skipping.\r\n'
     496            '3,c6,SampleContract,SAM,{},NONEXISTENT,[],document_object: Invalid value\r\n'
     497            '3,c7,SampleContract,NONEXISTENT,{},DOC1,[],product_object: Invalid value\r\n'
    498498            )
    499499        contract = self.processor.getEntry(dict(reg_number='1',
     
    506506        self.assertEqual(contract.product_options[0].currency, 'USD')
    507507        self.assertEqual(contract.contract_id, 'c3')
     508        self.assertEqual(contract.tc_dict, u"{'en':'Hello World'}")
    508509        contract = self.processor.getEntry(dict(reg_number='3',
    509510            contract_id='c5'), self.app)
     
    516517        self.assertTrue(
    517518            'INFO - system - Customer Sample Contract Processor - sample_contract_data - '
    518             'X666666 - %s - updated: product_object=SAM, document_object=DOC1, '
     519            'X666666 - %s - updated: product_object=SAM, tc_dict={}, document_object=DOC1, '
    519520            'product_options=[]' % conid
    520521            in logcontent)
Note: See TracChangeset for help on using the changeset viewer.