Ignore:
Timestamp:
3 Jan 2015, 07:38:07 (10 years ago)
Author:
Henrik Bettermann
Message:

Replace 'skeleton' by 'pcn'.

Location:
main/ikobacustom.pcn/trunk
Files:
6 edited
1 moved

Legend:

Unmodified
Added
Removed
  • main/ikobacustom.pcn/trunk

    • Property svn:global-ignores set to
      bin
      develop-eggs
      parts
      sources
      var
  • main/ikobacustom.pcn/trunk/src

    • Property svn:global-ignores set to
      ikobacustom.pcn.egg-info
  • main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/tests/test_browser.py

    r12369 r12371  
    3030from waeup.ikoba.customers.tests.test_batching import CustomerImportExportSetup
    3131from waeup.ikoba.customers.tests.test_browser import CustomersFullSetup
    32 from ikobacustom.skeleton.customers.export import (
    33     SkeletonCustomerExporter,
    34     SkeletonCustomerDocumentExporter,
    35     SkeletonContractExporter)
    36 from ikobacustom.skeleton.customers.batching import (
    37     SkeletonCustomerProcessor,
    38     SkeletonCustomerDocumentProcessor,
    39     SkeletonContractProcessor)
    40 from ikobacustom.skeleton.testing import FunctionalLayer, samples_dir
     32from ikobacustom.pcn.customers.export import (
     33    PCNCustomerExporter,
     34    PCNCustomerDocumentExporter,
     35    PCNContractExporter)
     36from ikobacustom.pcn.customers.batching import (
     37    PCNCustomerProcessor,
     38    PCNCustomerDocumentProcessor,
     39    PCNContractProcessor)
     40from ikobacustom.pcn.testing import FunctionalLayer, samples_dir
    4141
    4242SAMPLE_IMAGE = os.path.join(os.path.dirname(__file__), 'test_image.jpg')
     
    5656        IWorkflowState(customer).setState('started')
    5757        self.app['customers'].addCustomer(customer)
    58         document = createObject(u'waeup.SkeletonCustomerDocument')
     58        document = createObject(u'waeup.PCNCustomerDocument')
    5959        document.title = u'My first document'
    6060        customer['documents'].addDocument(document)
    61         contract = createObject(u'waeup.SkeletonContract')
     61        contract = createObject(u'waeup.PCNContract')
    6262        contract.tc_dict = {'en':u'Hello World'}
    6363        customer['contracts'].addContract(contract)
     
    7272        # set values we can expect in export file
    7373        self.setup_for_export()
    74         exporter = SkeletonCustomerExporter()
     74        exporter = PCNCustomerExporter()
    7575        exporter.export_all(self.app, self.outfile)
    7676        result = open(self.outfile, 'rb').read()
     
    8080            'K1000000,,Beate,Mueller,,,123,f,0,,,started,[]\r\n')
    8181        # We can reimport the file ...
    82         processor = SkeletonCustomerProcessor()
     82        processor = PCNCustomerProcessor()
    8383        result = processor.doImport(
    8484            self.outfile,
     
    112112        # set values we can expect in export file
    113113        self.setup_for_export()
    114         exporter = SkeletonCustomerDocumentExporter()
     114        exporter = PCNCustomerDocumentExporter()
    115115        exporter.export_all(self.app, self.outfile)
    116116        result = open(self.outfile, 'rb').read()
    117117        self.assertMatches(result,
    118118            'class_name,document_id,history,state,title,user_id\r\n'
    119             'SkeletonCustomerDocument,%s,'
     119            'PCNCustomerDocument,%s,'
    120120            '[u\'2014-12-21 17:00:36 WAT - Document created by system\'],'
    121121            'created,My first document,K1000000\r\n'
    122122            % self.document.document_id)
    123123        # We can reimport the file if we change the header (user_id -> customer_id)
    124         processor = SkeletonCustomerDocumentProcessor()
     124        processor = PCNCustomerDocumentProcessor()
    125125        open(self.outfile, 'wb').write(
    126126            'customer_id,class_name,document_id,state,title\r\n'
    127             'K1000000,SkeletonCustomerDocument,%s,started,My first title\r\n'
     127            'K1000000,PCNCustomerDocument,%s,started,My first title\r\n'
    128128            % self.document.document_id)
    129129        result = processor.doImport(
     
    156156        # set values we can expect in export file
    157157        self.setup_for_export()
    158         exporter = SkeletonContractExporter()
     158        exporter = PCNContractExporter()
    159159        exporter.export_all(self.app, self.outfile)
    160160        result = open(self.outfile, 'rb').read()
     
    163163            'history,last_product_id,product_object,product_options,'
    164164            'state,tc_dict,title,user_id\r\n'
    165             'SkeletonContract,sample,%s,,'
     165            'PCNContract,sample,%s,,'
    166166            '[u\'2014-12-21 22:26:00 WAT - Contract created by system\']'
    167167            ',,,[],created,{\'en\': u\'Hello World\'},,K1000000\r\n'
    168168            % self.contract.contract_id)
    169169        # We can reimport the file if we change the header (user_id -> customer_id)
    170         processor = SkeletonContractProcessor()
     170        processor = PCNContractProcessor()
    171171        open(self.outfile, 'wb').write(
    172172            'class_name,contract_category,contract_id,document_object,'
    173173            'history,last_product_id,product_object,product_options,'
    174174            'state,tc_dict,title,user_id\r\n'
    175             'SkeletonContract,sample,%s,,'
     175            'PCNContract,sample,%s,,'
    176176            '[u\'2014-12-21 22:26:00 WAT - Contract created by system\']'
    177177            ',,,[],created,{\'en\': u\'Hello World\'},,K1000000\r\n'
     
    219219        self.browser.open(self.customer_path + '/documents')
    220220        self.browser.getControl("Add document").click()
    221         self.browser.getControl(name="doctype").value = ['SkeletonCustomerDocument']
    222         self.browser.getControl(name="form.title").value = 'My Skeleton Document'
     221        self.browser.getControl(name="doctype").value = ['PCNCustomerDocument']
     222        self.browser.getControl(name="form.title").value = 'My PCN Document'
    223223        self.browser.getControl("Add document").click()
    224224        docid = [i for i in self.customer['documents'].keys() if len(i) > 10][0]
  • main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/tests/test_contract.py

    r12292 r12371  
    2828from waeup.ikoba.customers.contracts import ContractsContainer
    2929
    30 from ikobacustom.skeleton.testing import (FunctionalLayer, FunctionalTestCase)
    31 from ikobacustom.skeleton.customers.contracts import SkeletonContract
    32 from ikobacustom.skeleton.customers.interfaces import ISkeletonContract
     30from ikobacustom.pcn.testing import (FunctionalLayer, FunctionalTestCase)
     31from ikobacustom.pcn.customers.contracts import PCNContract
     32from ikobacustom.pcn.customers.interfaces import IPCNContract
    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(IPCNContract, PCNContract)
     41        verify.verifyClass(ICustomerNavigation, PCNContract)
     42        verify.verifyObject(IPCNContract, PCNContract())
     43        verify.verifyObject(ICustomerNavigation, PCNContract())
    4444        return
    4545
    4646    def test_addContract(self):
    4747        container = ContractsContainer()
    48         contract = createObject(u'waeup.SkeletonContract')
     48        contract = createObject(u'waeup.PCNContract')
    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, 'PCNContract')
    5454        return
  • main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/tests/test_customer.py

    r12273 r12371  
    1717##
    1818"""
    19 Tests for skeleton customers.
     19Tests for pcn customers.
    2020"""
    2121import tempfile
     
    3030from waeup.ikoba.customers.container import CustomersContainer
    3131
    32 from ikobacustom.skeleton.testing import (FunctionalLayer, FunctionalTestCase)
    33 from ikobacustom.skeleton.customers.customer import SkeletonCustomer
    34 from ikobacustom.skeleton.customers.interfaces import ISkeletonCustomer
     32from ikobacustom.pcn.testing import (FunctionalLayer, FunctionalTestCase)
     33from ikobacustom.pcn.customers.customer import PCNCustomer
     34from ikobacustom.pcn.customers.interfaces import IPCNCustomer
    3535
    36 class SkeletonCustomerTestCase(FunctionalTestCase):
     36class PCNCustomerTestCase(FunctionalTestCase):
    3737
    3838    layer = FunctionalLayer
    3939
    4040    def setUp(self):
    41         super(SkeletonCustomerTestCase, self).setUp()
     41        super(PCNCustomerTestCase, 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(IPCNCustomer, PCNCustomer)
     55        verify.verifyClass(ICustomerNavigation, PCNCustomer)
     56        verify.verifyObject(IPCNCustomer, PCNCustomer())
     57        verify.verifyObject(ICustomerNavigation, PCNCustomer())
    5858        return
    5959
    60     def test_addSkeletonCustomer(self):
     60    def test_addPCNCustomer(self):
    6161        customer = createObject(u'waeup.Customer')
    62         verify.verifyObject(ISkeletonCustomer, customer)
     62        verify.verifyObject(IPCNCustomer, 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(PCNCustomerTestCase, self).tearDown()
    7171        return
  • main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/tests/test_document.py

    r12292 r12371  
    2828from waeup.ikoba.customers.documents import CustomerDocumentsContainer
    2929
    30 from ikobacustom.skeleton.testing import (FunctionalLayer, FunctionalTestCase)
    31 from ikobacustom.skeleton.customers.documents import SkeletonCustomerDocument
    32 from ikobacustom.skeleton.customers.interfaces import ISkeletonCustomerDocument
     30from ikobacustom.pcn.testing import (FunctionalLayer, FunctionalTestCase)
     31from ikobacustom.pcn.customers.documents import PCNCustomerDocument
     32from ikobacustom.pcn.customers.interfaces import IPCNCustomerDocument
    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(IPCNCustomerDocument, PCNCustomerDocument)
     41        verify.verifyClass(ICustomerNavigation, PCNCustomerDocument)
     42        verify.verifyObject(IPCNCustomerDocument, PCNCustomerDocument())
     43        verify.verifyObject(ICustomerNavigation, PCNCustomerDocument())
    4444        return
    4545
    4646    def test_addDocument(self):
    4747        container = CustomerDocumentsContainer()
    48         document = createObject(u'waeup.SkeletonCustomerDocument')
     48        document = createObject(u'waeup.PCNCustomerDocument')
    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, 'PCNCustomerDocument')
    5454        return
Note: See TracChangeset for help on using the changeset viewer.