Ignore:
Timestamp:
16 Dec 2014, 09:02:13 (10 years ago)
Author:
Henrik Bettermann
Message:

Some repairs of document and contract batch processors (work in progress!).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_batching.py

    r12143 r12250  
    322322
    323323    def test_addEntry(self):
     324        self.assertEqual(self.app._curr_doc_id, 102)
    324325        self.assertEqual(len(self.customer['documents'].keys()),1)
    325326        document1 = createObject(u'waeup.CustomerSampleDocument')
     
    330331        self.assertEqual(len(self.customer['documents'].keys()),2)
    331332        self.assertEqual(self.customer['documents']['d234'].document_id, 'd234')
    332         document2 = createObject(u'waeup.CustomerSampleDocument')
    333         document1.document_id = 'nonsense'
     333        # _curr_doc_id hasn't changed
     334        self.assertEqual(self.app._curr_doc_id, 102)
    334335
    335336    def test_checkConversion(self):
     337        self.assertEqual(self.app._curr_doc_id, 102)
    336338        errs, inv_errs, conv_dict = self.processor.checkConversion(
    337339            dict(document_id='d126', class_name='CustomerSampleDocument'))
     
    347349            mode='update'))
    348350        self.assertEqual(len(errs),1)
     351        # _curr_doc_id hasn't changed
     352        self.assertEqual(self.app._curr_doc_id, 102)
    349353
    350354    def test_import(self):
     
    455459
    456460    def test_addEntry(self):
     461        self.assertEqual(self.app._curr_con_id, 102)
    457462        self.assertEqual(len(self.customer['contracts'].keys()),1)
    458463        contract1 = createObject(u'waeup.SampleContract')
     
    463468        self.assertEqual(len(self.customer['contracts'].keys()),2)
    464469        self.assertEqual(self.customer['contracts']['c234'].contract_id, 'c234')
    465         contract2 = createObject(u'waeup.SampleContract')
    466         contract1.contract_id = 'nonsense'
     470        # _curr_con_id hasn't changed
     471        self.assertEqual(self.app._curr_con_id, 102)
    467472
    468473    def test_checkConversion(self):
     474        self.assertEqual(self.app._curr_con_id, 102)
    469475        errs, inv_errs, conv_dict = self.processor.checkConversion(
    470476            dict(contract_id='c126', class_name='SampleContract',
     
    477483            dict(contract_id='c127', class_name='WrongContract'))
    478484        self.assertEqual(len(errs),1)
     485        # _curr_con_id hasn't changed
     486        self.assertEqual(self.app._curr_con_id, 102)
    479487
    480488    def test_import(self):
Note: See TracChangeset for help on using the changeset viewer.