Changeset 12367 for main


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

Extend tests.

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  
    6060        customer['documents'].addDocument(document)
    6161        contract = createObject(u'waeup.SkeletonContract')
     62        contract.tc_dict = {'en':u'Hello World'}
    6263        customer['contracts'].addContract(contract)
    6364        self.customer = customer
     
    161162            'class_name,contract_category,contract_id,document_object,'
    162163            'history,last_product_id,product_object,product_options,'
    163             'state,title,user_id\r\n'
     164            'state,tc_dict,title,user_id\r\n'
    164165            'SkeletonContract,sample,%s,,'
    165166            '[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'
    167168            % self.contract.contract_id)
    168169        # We can reimport the file if we change the header (user_id -> customer_id)
     
    171172            'class_name,contract_category,contract_id,document_object,'
    172173            'history,last_product_id,product_object,product_options,'
    173             'state,title,user_id\r\n'
     174            'state,tc_dict,title,user_id\r\n'
    174175            'SkeletonContract,sample,%s,,'
    175176            '[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'
    177178            % self.contract.contract_id)
    178179        result = processor.doImport(
     
    180181            ['class_name','contract_category','contract_id','document_object',
    181182            'history','last_product_id','product_object','product_options',
    182             'state','title','customer_id'],
     183            'state','tc_dict','title','customer_id'],
    183184            mode='create')
    184185        num, num_fail, finished_path, failed_path = result
     
    191192            ['class_name','contract_category','contract_id','document_object',
    192193            'history','last_product_id','product_object','product_options',
    193             'state','title','customer_id'],
     194            'state','tc_dict','title','customer_id'],
    194195            mode='create')
    195196        num_succ, num_fail, finished_path, failed_path = result
     
    200201            ['class_name','contract_category','contract_id','document_object',
    201202            'history','last_product_id','product_object','product_options',
    202             'state','title','customer_id'],
     203            'state','tc_dict','title','customer_id'],
    203204            mode='update')
    204205        num_succ, num_fail, finished_path, failed_path = result
  • main/ikobacustom.skeleton/trunk/src/ikobacustom/skeleton/products/tests/test_browser.py

    r12359 r12367  
    5454        self.assertEqual(result,
    5555            'contract_category,contract_title,options,'
    56             'product_id,title,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')
    5858        # We can import the same file.
    5959        processor = SkeletonProductProcessor()
     
    6161            self.outfile,
    6262            ['contract_category','contract_title', 'options,', 'product_id',
    63             'title','valid_from','valid_to','users_with_local_roles'],
     63            'terms_and_conditions','title','valid_from','valid_to','users_with_local_roles'],
    6464            mode='create')
    6565        num, num_fail, finished_path, failed_path = result
     
    7272            self.outfile,
    7373            ['contract_category','contract_title', 'options,', 'product_id',
    74             'title','valid_from','valid_to','users_with_local_roles'],
     74            'terms_and_conditions','title','valid_from','valid_to','users_with_local_roles'],
    7575            mode='create')
    7676        num, num_fail, finished_path, failed_path = result
     
    8181            self.outfile,
    8282            ['contract_category','contract_title', 'options,', 'product_id',
    83             'title','valid_from','valid_to','users_with_local_roles'],
     83            'terms_and_conditions','title','valid_from','valid_to','users_with_local_roles'],
    8484            mode='update')
    8585        num, num_fail, finished_path, failed_path = result
Note: See TracChangeset for help on using the changeset viewer.