Ignore:
Timestamp:
23 Sep 2016, 05:54:20 (8 years ago)
Author:
Henrik Bettermann
Message:

Renaming 2

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

Legend:

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

    r14178 r14181  
    3131from waeup.ikoba.customers.tests.test_browser import CustomersFullSetup
    3232from ikobacustom.uniben.customers.export import (
    33     SkeletonCustomerExporter,
    34     SkeletonCustomerDocumentExporter,
    35     SkeletonContractExporter)
     33    UnibenCustomerExporter,
     34    UnibenCustomerDocumentExporter,
     35    UnibenContractExporter)
    3636from ikobacustom.uniben.customers.batching import (
    37     SkeletonCustomerProcessor,
    38     SkeletonCustomerDocumentProcessor,
    39     SkeletonContractProcessor)
     37    UnibenCustomerProcessor,
     38    UnibenCustomerDocumentProcessor,
     39    UnibenContractProcessor)
    4040from ikobacustom.uniben.testing import FunctionalLayer, samples_dir
    4141
     
    6161        IWorkflowState(customer).setState('started')
    6262        self.app['customers'].addCustomer(customer)
    63         document = createObject(u'waeup.SkeletonCustomerDocument')
     63        document = createObject(u'waeup.UnibenCustomerDocument')
    6464        document.title = u'My first document'
    6565        customer['documents'].addDocument(document)
    66         contract = createObject(u'waeup.SkeletonContract')
     66        contract = createObject(u'waeup.UnibenContract')
    6767        contract.tc_dict = {'en':u'Hello World'}
    6868        customer['contracts'].addContract(contract)
     
    7777        # set values we can expect in export file
    7878        self.setup_for_export()
    79         exporter = SkeletonCustomerExporter()
     79        exporter = UnibenCustomerExporter()
    8080        exporter.export_all(self.app, self.outfile)
    8181        result = open(self.outfile, 'rb').read()
     
    8585            'K1000000,aa@aa.aa,Beate,Mueller,,,123,f,0,,,started,[]\r\n')
    8686        # We can reimport the file ...
    87         processor = SkeletonCustomerProcessor()
     87        processor = UnibenCustomerProcessor()
    8888        result = processor.doImport(
    8989            self.outfile,
     
    118118        # set values we can expect in export file
    119119        self.setup_for_export()
    120         exporter = SkeletonCustomerDocumentExporter()
     120        exporter = UnibenCustomerDocumentExporter()
    121121        exporter.export_all(self.app, self.outfile)
    122122        result = open(self.outfile, 'rb').read()
    123123        self.assertMatches(result,
    124124            'class_name,document_id,history,state,title,user_id\r\n'
    125             'SkeletonCustomerDocument,%s,'
     125            'UnibenCustomerDocument,%s,'
    126126            '[u\'2014-12-21 17:00:36 WAT - Document created by system\'],'
    127127            'created,My first document,K1000000\r\n'
    128128            % self.document.document_id)
    129129        # We can reimport the file if we change the header (user_id -> customer_id)
    130         processor = SkeletonCustomerDocumentProcessor()
     130        processor = UnibenCustomerDocumentProcessor()
    131131        open(self.outfile, 'wb').write(
    132132            'customer_id,class_name,document_id,state,title\r\n'
    133             'K1000000,SkeletonCustomerDocument,%s,started,My first title\r\n'
     133            'K1000000,UnibenCustomerDocument,%s,started,My first title\r\n'
    134134            % self.document.document_id)
    135135        result = processor.doImport(
     
    162162        # set values we can expect in export file
    163163        self.setup_for_export()
    164         exporter = SkeletonContractExporter()
     164        exporter = UnibenContractExporter()
    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             'SkeletonContract,,sample,%s,,0,'
     171            'UnibenContract,,sample,%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 = SkeletonContractProcessor()
     176        processor = UnibenContractProcessor()
    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             'SkeletonContract,sample,%s,,'
     181            'UnibenContract,sample,%s,,'
    182182            '[u\'2014-12-21 22:26:00 WAT - Contract created by system\']'
    183183            ',,,[],created,{\'en\': u\'Hello World\'},,K1000000\r\n'
     
    221221    def setup_customizable_params(self):
    222222        self._contract_category = u'sample'
    223         self._document_factory = 'waeup.SkeletonCustomerDocument'
    224         self._contract_factory = 'waeup.SkeletonContract'
     223        self._document_factory = 'waeup.UnibenCustomerDocument'
     224        self._contract_factory = 'waeup.UnibenContract'
    225225        return
    226226
     
    304304    def setup_customizable_params(self):
    305305        self._contract_category = u'sample'
    306         self._document_factory = 'waeup.SkeletonCustomerDocument'
    307         self._contract_factory = 'waeup.SkeletonContract'
     306        self._document_factory = 'waeup.UnibenCustomerDocument'
     307        self._contract_factory = 'waeup.UnibenContract'
    308308        return
    309309
  • main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/tests/test_contract.py

    r14178 r14181  
    2929
    3030from ikobacustom.uniben.testing import (FunctionalLayer, FunctionalTestCase)
    31 from ikobacustom.uniben.customers.contracts import SkeletonContract
    32 from ikobacustom.uniben.customers.interfaces import ISkeletonContract
     31from ikobacustom.uniben.customers.contracts import UnibenContract
     32from ikobacustom.uniben.customers.interfaces import IUnibenContract
    3333
    3434
     
    3838
    3939    def test_interfaces(self):
    40         verify.verifyClass(ISkeletonContract, SkeletonContract)
    41         verify.verifyClass(ICustomerNavigation, SkeletonContract)
    42         verify.verifyObject(ISkeletonContract, SkeletonContract())
    43         verify.verifyObject(ICustomerNavigation, SkeletonContract())
     40        verify.verifyClass(IUnibenContract, UnibenContract)
     41        verify.verifyClass(ICustomerNavigation, UnibenContract)
     42        verify.verifyObject(IUnibenContract, UnibenContract())
     43        verify.verifyObject(ICustomerNavigation, UnibenContract())
    4444        return
    4545
    4646    def test_addContract(self):
    4747        container = ContractsContainer()
    48         contract = createObject(u'waeup.SkeletonContract')
     48        contract = createObject(u'waeup.UnibenContract')
    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, 'SkeletonContract')
     53        self.assertEqual(contract.class_name, 'UnibenContract')
    5454        return
  • main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/tests/test_customer.py

    r14178 r14181  
    3131
    3232from ikobacustom.uniben.testing import (FunctionalLayer, FunctionalTestCase)
    33 from ikobacustom.uniben.customers.customer import SkeletonCustomer
    34 from ikobacustom.uniben.customers.interfaces import ISkeletonCustomer
     33from ikobacustom.uniben.customers.customer import UnibenCustomer
     34from ikobacustom.uniben.customers.interfaces import IUnibenCustomer
    3535
    36 class SkeletonCustomerTestCase(FunctionalTestCase):
     36class UnibenCustomerTestCase(FunctionalTestCase):
    3737
    3838    layer = FunctionalLayer
    3939
    4040    def setUp(self):
    41         super(SkeletonCustomerTestCase, self).setUp()
     41        super(UnibenCustomerTestCase, self).setUp()
    4242
    4343        # Prepopulate ZODB
     
    5252
    5353    def test_interfaces(self):
    54         verify.verifyClass(ISkeletonCustomer, SkeletonCustomer)
    55         verify.verifyClass(ICustomerNavigation, SkeletonCustomer)
    56         verify.verifyObject(ISkeletonCustomer, SkeletonCustomer())
    57         verify.verifyObject(ICustomerNavigation, SkeletonCustomer())
     54        verify.verifyClass(IUnibenCustomer, UnibenCustomer)
     55        verify.verifyClass(ICustomerNavigation, UnibenCustomer)
     56        verify.verifyObject(IUnibenCustomer, UnibenCustomer())
     57        verify.verifyObject(ICustomerNavigation, UnibenCustomer())
    5858        return
    5959
    60     def test_addSkeletonCustomer(self):
     60    def test_addUnibenCustomer(self):
    6161        customer = createObject(u'waeup.Customer')
    62         verify.verifyObject(ISkeletonCustomer, customer)
     62        verify.verifyObject(IUnibenCustomer, customer)
    6363        self.app['customers'].addCustomer(customer)
    6464        self.assertEqual(customer.customer_id, 'K1000000')
     
    6868    def tearDown(self):
    6969        shutil.rmtree(self.dc_root)
    70         super(SkeletonCustomerTestCase, self).tearDown()
     70        super(UnibenCustomerTestCase, self).tearDown()
    7171        return
  • main/ikobacustom.uniben/trunk/src/ikobacustom/uniben/customers/tests/test_document.py

    r14178 r14181  
    2929
    3030from ikobacustom.uniben.testing import (FunctionalLayer, FunctionalTestCase)
    31 from ikobacustom.uniben.customers.documents import SkeletonCustomerDocument
    32 from ikobacustom.uniben.customers.interfaces import ISkeletonCustomerDocument
     31from ikobacustom.uniben.customers.documents import UnibenCustomerDocument
     32from ikobacustom.uniben.customers.interfaces import IUnibenCustomerDocument
    3333
    3434
     
    3838
    3939    def test_interfaces(self):
    40         verify.verifyClass(ISkeletonCustomerDocument, SkeletonCustomerDocument)
    41         verify.verifyClass(ICustomerNavigation, SkeletonCustomerDocument)
    42         verify.verifyObject(ISkeletonCustomerDocument, SkeletonCustomerDocument())
    43         verify.verifyObject(ICustomerNavigation, SkeletonCustomerDocument())
     40        verify.verifyClass(IUnibenCustomerDocument, UnibenCustomerDocument)
     41        verify.verifyClass(ICustomerNavigation, UnibenCustomerDocument)
     42        verify.verifyObject(IUnibenCustomerDocument, UnibenCustomerDocument())
     43        verify.verifyObject(ICustomerNavigation, UnibenCustomerDocument())
    4444        return
    4545
    4646    def test_addDocument(self):
    4747        container = CustomerDocumentsContainer()
    48         document = createObject(u'waeup.SkeletonCustomerDocument')
     48        document = createObject(u'waeup.UnibenCustomerDocument')
    4949        id = document.document_id
    5050        container.addDocument(document)
    5151        self.assertEqual(container[id], document)
    5252        self.assertRaises(TypeError, container.addDocument, object())
    53         self.assertEqual(document.class_name, 'SkeletonCustomerDocument')
     53        self.assertEqual(document.class_name, 'UnibenCustomerDocument')
    5454        return
Note: See TracChangeset for help on using the changeset viewer.