Ignore:
Timestamp:
23 Sep 2016, 16:38:53 (8 years ago)
Author:
Henrik Bettermann
Message:

Further customizations.

Location:
main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/tests/test_browser.py

    r14181 r14184  
    3333    UnibenCustomerExporter,
    3434    UnibenCustomerDocumentExporter,
    35     UnibenContractExporter)
     35    RIAAContractExporter)
    3636from ikobacustom.uniben.customers.batching import (
    3737    UnibenCustomerProcessor,
    3838    UnibenCustomerDocumentProcessor,
    39     UnibenContractProcessor)
     39    RIAAContractProcessor)
    4040from ikobacustom.uniben.testing import FunctionalLayer, samples_dir
    4141
     
    4949
    5050    def setup_customizable_params(self):
    51         self._contract_category = u'sample'
     51        self._contract_category = u'riaa'
    5252        return
    5353
     
    6464        document.title = u'My first document'
    6565        customer['documents'].addDocument(document)
    66         contract = createObject(u'waeup.UnibenContract')
     66        contract = createObject(u'waeup.RIAAContract')
    6767        contract.tc_dict = {'en':u'Hello World'}
    6868        customer['contracts'].addContract(contract)
     
    162162        # set values we can expect in export file
    163163        self.setup_for_export()
    164         exporter = UnibenContractExporter()
     164        exporter = RIAAContractExporter()
    165165        exporter.export_all(self.app, self.outfile)
    166166        result = open(self.outfile, 'rb').read()
     
    169169            'fee_based,history,last_product_id,product_object,product_options,'
    170170            'state,tc_dict,title,user_id,valid_from,valid_to\r\n'
    171             'UnibenContract,,sample,%s,,0,'
     171            'RIAAContract,,riaa,%s,,0,'
    172172            '[u\'2014-12-21 22:26:00 WAT - Contract created by system\']'
    173173            ',,,[],created,{\'en\': u\'Hello World\'},,K1000000,,\r\n'
    174174            % self.contract.contract_id)
    175175        # We can reimport the file if we change the header (user_id -> customer_id)
    176         processor = UnibenContractProcessor()
     176        processor = RIAAContractProcessor()
    177177        open(self.outfile, 'wb').write(
    178178            'class_name,contract_category,contract_id,document_object,'
    179179            'history,last_product_id,product_object,product_options,'
    180180            'state,tc_dict,title,user_id\r\n'
    181             'UnibenContract,sample,%s,,'
     181            'RIAAContract,riaa,%s,,'
    182182            '[u\'2014-12-21 22:26:00 WAT - Contract created by system\']'
    183183            ',,,[],created,{\'en\': u\'Hello World\'},,K1000000\r\n'
     
    220220
    221221    def setup_customizable_params(self):
    222         self._contract_category = u'sample'
     222        self._contract_category = u'riaa'
    223223        self._document_factory = 'waeup.UnibenCustomerDocument'
    224         self._contract_factory = 'waeup.UnibenContract'
     224        self._contract_factory = 'waeup.RIAAContract'
    225225        return
    226226
     
    303303
    304304    def setup_customizable_params(self):
    305         self._contract_category = u'sample'
     305        self._contract_category = u'riaa'
    306306        self._document_factory = 'waeup.UnibenCustomerDocument'
    307         self._contract_factory = 'waeup.UnibenContract'
     307        self._contract_factory = 'waeup.RIAAContract'
    308308        return
    309309
  • main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/tests/test_contract.py

    r14181 r14184  
    2929
    3030from ikobacustom.uniben.testing import (FunctionalLayer, FunctionalTestCase)
    31 from ikobacustom.uniben.customers.contracts import UnibenContract
    32 from ikobacustom.uniben.customers.interfaces import IUnibenContract
     31from ikobacustom.uniben.customers.contracts import RIAAContract
     32from ikobacustom.uniben.customers.interfaces import IRIAAContract
    3333
    3434
     
    3838
    3939    def test_interfaces(self):
    40         verify.verifyClass(IUnibenContract, UnibenContract)
    41         verify.verifyClass(ICustomerNavigation, UnibenContract)
    42         verify.verifyObject(IUnibenContract, UnibenContract())
    43         verify.verifyObject(ICustomerNavigation, UnibenContract())
     40        verify.verifyClass(IRIAAContract, RIAAContract)
     41        verify.verifyClass(ICustomerNavigation, RIAAContract)
     42        verify.verifyObject(IRIAAContract, RIAAContract())
     43        verify.verifyObject(ICustomerNavigation, RIAAContract())
    4444        return
    4545
    4646    def test_addContract(self):
    4747        container = ContractsContainer()
    48         contract = createObject(u'waeup.UnibenContract')
     48        contract = createObject(u'waeup.RIAAContract')
    4949        id = contract.contract_id
    5050        container.addContract(contract)
    5151        self.assertEqual(container[id], contract)
    5252        self.assertRaises(TypeError, container.addContract, object())
    53         self.assertEqual(contract.class_name, 'UnibenContract')
     53        self.assertEqual(contract.class_name, 'RIAAContract')
    5454        return
Note: See TracChangeset for help on using the changeset viewer.