Ignore:
Timestamp:
21 Dec 2014, 10:35:54 (10 years ago)
Author:
Henrik Bettermann
Message:

Reorganize batch processor classes to ease customization.

File:
1 edited

Legend:

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

    r12261 r12281  
    3737    IBatchProcessor, FatalCSVError, IUserAccount, VERIFIED)
    3838from waeup.ikoba.customers.batching import (
    39     CustomerProcessor, CustomerDocumentProcessor, ContractProcessor)
     39    CustomerProcessor, CustomerSampleDocumentProcessor, SampleContractProcessor)
    4040from waeup.ikoba.customers.customer import Customer
    4141from waeup.ikoba.customers.documents import CustomerSampleDocument
     
    274274        shutil.rmtree(os.path.dirname(fin_file))
    275275
    276 class CustomerDocumentProcessorTest(CustomerImportExportSetup):
     276class CustomerSampleDocumentProcessorTest(CustomerImportExportSetup):
    277277
    278278    def setUp(self):
    279         super(CustomerDocumentProcessorTest, self).setUp()
     279        super(CustomerSampleDocumentProcessorTest, self).setUp()
    280280
    281281        customer = Customer()
     
    292292        shutil.rmtree(os.path.dirname(fin_file))
    293293
    294         self.processor = CustomerDocumentProcessor()
     294        self.processor = CustomerSampleDocumentProcessor()
    295295        self.csv_file = os.path.join(
    296296            self.workdir, 'sample_document_data.csv')
     
    301301        assert verifyObject(IBatchProcessor, self.processor) is True
    302302        assert verifyClass(
    303             IBatchProcessor, CustomerDocumentProcessor) is True
     303            IBatchProcessor, CustomerSampleDocumentProcessor) is True
    304304
    305305    def test_getEntry(self):
     
    369369         # Logging message from updateEntry
    370370        self.assertTrue(
    371             'INFO - system - CustomerDocument Processor - '
     371            'INFO - system - Customer Sample Document Processor - '
    372372            'sample_document_data - X666666 - %s - updated: title=My 4th doc'
    373373            % docid in logcontent)
     
    404404
    405405
    406 class ContractProcessorTest(CustomerImportExportSetup):
     406class SampleContractProcessorTest(CustomerImportExportSetup):
    407407
    408408    def setUp(self):
    409         super(ContractProcessorTest, self).setUp()
     409        super(SampleContractProcessorTest, self).setUp()
    410410
    411411        customer = Customer()
     
    422422        shutil.rmtree(os.path.dirname(fin_file))
    423423
    424         self.processor = ContractProcessor()
     424        self.processor = SampleContractProcessor()
    425425        self.csv_file = os.path.join(
    426426            self.workdir, 'sample_contract_data.csv')
     
    431431        assert verifyObject(IBatchProcessor, self.processor) is True
    432432        assert verifyClass(
    433             IBatchProcessor, ContractProcessor) is True
     433            IBatchProcessor, SampleContractProcessor) is True
    434434
    435435    def test_getEntry(self):
     
    502502            if len(i) > 10][0]
    503503        self.assertTrue(
    504             'INFO - system - Contract Processor - sample_contract_data - '
     504            'INFO - system - Sample Contract Processor - sample_contract_data - '
    505505            'X666666 - %s - updated: title=My 4th contract, '
    506506            'product_object=SAM, document_object=DOC1' % conid
Note: See TracChangeset for help on using the changeset viewer.