- Timestamp:
- 5 Dec 2016, 09:14:32 (8 years ago)
- Location:
- main/ikobacustom.aaue/trunk/src/ikobacustom/aaue
- Files:
-
- 13 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
main/ikobacustom.aaue/trunk/src/ikobacustom/aaue/customers/batching.py
r12286 r14310 16 16 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 17 ## 18 """Batch processing for skeletondocuments.18 """Batch processing for aaue documents. 19 19 """ 20 20 import grok … … 22 22 CustomerProcessor, 23 23 CustomerDocumentProcessorBase, ContractProcessorBase) 24 from ikobacustom. skeleton.customers.interfaces import (25 I SkeletonCustomer,26 I SkeletonCustomerDocument, ISkeletonContract)27 from ikobacustom. skeleton.interfaces import MessageFactory as _24 from ikobacustom.aaue.customers.interfaces import ( 25 IAAUECustomer, 26 IAAUECustomerDocument, IAAUEContract) 27 from ikobacustom.aaue.interfaces import MessageFactory as _ 28 28 29 29 30 class SkeletonCustomerProcessor(CustomerProcessor):30 class AAUECustomerProcessor(CustomerProcessor): 31 31 """A batch processor for ICustomer objects. 32 32 """ 33 util_name = ' skeletoncustomerprocessor'33 util_name = 'aauecustomerprocessor' 34 34 grok.name(util_name) 35 name = _(' SkeletonCustomer Processor')36 iface = I SkeletonCustomer35 name = _('AAUE Customer Processor') 36 iface = IAAUECustomer 37 37 38 38 39 class SkeletonCustomerDocumentProcessor(CustomerDocumentProcessorBase):40 """A batch processor for I SkeletonCustomerDocument objects.39 class AAUECustomerDocumentProcessor(CustomerDocumentProcessorBase): 40 """A batch processor for IAAUECustomerDocument objects. 41 41 """ 42 util_name = ' skeletoncustomerdocumentprocessor'42 util_name = 'aauecustomerdocumentprocessor' 43 43 grok.name(util_name) 44 name = _(' SkeletonCustomer Document Processor')45 iface = I SkeletonCustomerDocument46 factory_name = 'waeup. SkeletonCustomerDocument'44 name = _('AAUE Customer Document Processor') 45 iface = IAAUECustomerDocument 46 factory_name = 'waeup.AAUECustomerDocument' 47 47 48 48 49 class SkeletonContractProcessor(ContractProcessorBase):50 """A batch processor for I SkeletonContract objects.49 class AAUEContractProcessor(ContractProcessorBase): 50 """A batch processor for IAAUEContract objects. 51 51 """ 52 util_name = ' skeletoncontractprocessor'52 util_name = 'aauecontractprocessor' 53 53 grok.name(util_name) 54 name = _(' SkeletonCustomer Contract Processor')55 iface = I SkeletonContract56 factory_name = 'waeup. SkeletonContract'54 name = _('AAUE Customer Contract Processor') 55 iface = IAAUEContract 56 factory_name = 'waeup.AAUEContract' -
main/ikobacustom.aaue/trunk/src/ikobacustom/aaue/customers/browser.py
r13067 r14310 21 21 from waeup.ikoba.customers.browser import ( 22 22 PDFContractSlip, CustomerBaseEditFormPage) 23 from ikobacustom. skeleton.interfaces import MessageFactory as _23 from ikobacustom.aaue.interfaces import MessageFactory as _ 24 24 25 25 class PDFContractSlip(PDFContractSlip): -
main/ikobacustom.aaue/trunk/src/ikobacustom/aaue/customers/contracts.py
r12502 r14310 26 26 from waeup.ikoba.customers.interfaces import ICustomerNavigation 27 27 from waeup.ikoba.customers.contracts import ContractBase 28 from ikobacustom. skeleton.interfaces import MessageFactory as _29 from ikobacustom. skeleton.customers.interfaces import (30 I SkeletonContract, ISkeletonContractEdit, ISkeletonContractProcess,31 I SkeletonContractOfficialUse)28 from ikobacustom.aaue.interfaces import MessageFactory as _ 29 from ikobacustom.aaue.customers.interfaces import ( 30 IAAUEContract, IAAUEContractEdit, IAAUEContractProcess, 31 IAAUEContractOfficialUse) 32 32 33 33 34 class SkeletonContract(ContractBase):34 class AAUEContract(ContractBase): 35 35 """This is a sample contract. 36 36 """ 37 37 38 38 grok.implements( 39 I SkeletonContractProcess,40 I SkeletonContract,41 I SkeletonContractEdit,39 IAAUEContractProcess, 40 IAAUEContract, 41 IAAUEContractEdit, 42 42 ICustomerNavigation) 43 43 44 44 contract_category = 'sample' 45 45 46 form_fields_interface = I SkeletonContract46 form_fields_interface = IAAUEContract 47 47 48 edit_form_fields_interface = I SkeletonContractEdit48 edit_form_fields_interface = IAAUEContractEdit 49 49 50 ou_form_fields_interface = I SkeletonContractOfficialUse50 ou_form_fields_interface = IAAUEContractOfficialUse 51 51 52 check_docs_interface = I SkeletonContract52 check_docs_interface = IAAUEContract 53 53 54 SkeletonContract = attrs_to_fields(SkeletonContract)54 AAUEContract = attrs_to_fields(AAUEContract) 55 55 56 56 57 57 # Contracts must be importable. So we might need a factory. 58 class SkeletonContractFactory(grok.GlobalUtility):58 class AAUEContractFactory(grok.GlobalUtility): 59 59 """A factory for contracts. 60 60 """ 61 61 grok.implements(IFactory) 62 grok.name(u'waeup. SkeletonContract')62 grok.name(u'waeup.AAUEContract') 63 63 title = u"Create a new contract.", 64 64 description = u"This factory instantiates new sample contract instances." 65 65 66 66 def __call__(self, *args, **kw): 67 return SkeletonContract(*args, **kw)67 return AAUEContract(*args, **kw) 68 68 69 69 def getInterfaces(self): 70 return implementedBy( SkeletonContract)70 return implementedBy(AAUEContract) -
main/ikobacustom.aaue/trunk/src/ikobacustom/aaue/customers/customer.py
r12399 r14310 25 25 from waeup.ikoba.customers.customer import Customer 26 26 from waeup.ikoba.customers.interfaces import ICustomerNavigation 27 from ikobacustom. skeleton.customers.interfaces import ISkeletonCustomer28 from ikobacustom. skeleton.interfaces import MessageFactory as _27 from ikobacustom.aaue.customers.interfaces import IAAUECustomer 28 from ikobacustom.aaue.interfaces import MessageFactory as _ 29 29 30 30 31 class SkeletonCustomer(Customer):31 class AAUECustomer(Customer): 32 32 """This is a customer container for the various objects 33 33 owned by customers. 34 34 """ 35 grok.implements(I SkeletonCustomer, ICustomerNavigation)36 grok.provides(I SkeletonCustomer)35 grok.implements(IAAUECustomer, ICustomerNavigation) 36 grok.provides(IAAUECustomer) 37 37 38 form_fields_interface = I SkeletonCustomer38 form_fields_interface = IAAUECustomer 39 39 40 SkeletonCustomer = attrs_to_fields(SkeletonCustomer)40 AAUECustomer = attrs_to_fields(AAUECustomer) 41 41 42 42 43 class SkeletonCustomerFactory(grok.GlobalUtility):43 class AAUECustomerFactory(grok.GlobalUtility): 44 44 """A factory for customers. 45 45 """ 46 46 grok.implements(IFactory) 47 47 grok.name(u'waeup.Customer') 48 title = u"Create a new skeletoncustomer.",49 description = u"This factory instantiates new skeletoncustomer instances."48 title = u"Create a new aaue customer.", 49 description = u"This factory instantiates new aaue customer instances." 50 50 51 51 def __call__(self, *args, **kw): 52 return SkeletonCustomer()52 return AAUECustomer() 53 53 54 54 def getInterfaces(self): 55 return implementedBy( SkeletonCustomer)55 return implementedBy(AAUECustomer) -
main/ikobacustom.aaue/trunk/src/ikobacustom/aaue/customers/documents.py
r12355 r14310 25 25 from waeup.ikoba.customers.interfaces import ICustomerNavigation 26 26 from waeup.ikoba.customers.documents import CustomerDocumentBase 27 from ikobacustom. skeleton.interfaces import MessageFactory as _28 from ikobacustom. skeleton.customers.interfaces import ISkeletonCustomerDocument27 from ikobacustom.aaue.interfaces import MessageFactory as _ 28 from ikobacustom.aaue.customers.interfaces import IAAUECustomerDocument 29 29 30 30 31 class SkeletonCustomerDocument(CustomerDocumentBase):31 class AAUECustomerDocument(CustomerDocumentBase): 32 32 """This is a sample customer document. 33 33 """ 34 34 35 grok.implements(I SkeletonCustomerDocument, ICustomerNavigation)36 grok.provides(I SkeletonCustomerDocument)35 grok.implements(IAAUECustomerDocument, ICustomerNavigation) 36 grok.provides(IAAUECustomerDocument) 37 37 38 38 # Ikoba can store any number of files per Document object. … … 42 42 filenames = ('sample',) 43 43 44 form_fields_interface = I SkeletonCustomerDocument44 form_fields_interface = IAAUECustomerDocument 45 45 46 SkeletonCustomerDocument = attrs_to_fields(SkeletonCustomerDocument)46 AAUECustomerDocument = attrs_to_fields(AAUECustomerDocument) 47 47 48 48 49 49 # Customer documents must be importable. So we need a factory. 50 class SkeletonCustomerDocumentFactory(grok.GlobalUtility):50 class AAUECustomerDocumentFactory(grok.GlobalUtility): 51 51 """A factory for customer documents. 52 52 """ 53 53 grok.implements(IFactory) 54 grok.name(u'waeup. SkeletonCustomerDocument')54 grok.name(u'waeup.AAUECustomerDocument') 55 55 title = u"Create a new document.", 56 56 description = u"This factory instantiates new sample document instances." 57 57 58 58 def __call__(self, *args, **kw): 59 return SkeletonCustomerDocument(*args, **kw)59 return AAUECustomerDocument(*args, **kw) 60 60 61 61 def getInterfaces(self): 62 return implementedBy( SkeletonCustomerDocument)62 return implementedBy(AAUECustomerDocument) -
main/ikobacustom.aaue/trunk/src/ikobacustom/aaue/customers/export.py
r12502 r14310 16 16 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 17 ## 18 """Exporters for skeletoncustomer objects and subobjects.18 """Exporters for aaue customer objects and subobjects. 19 19 """ 20 20 import grok 21 21 from waeup.ikoba.customers.export import ( 22 22 CustomerExporter, CustomerDocumentExporterBase, ContractExporterBase) 23 from ikobacustom. skeleton.customers.interfaces import (24 I SkeletonCustomer, ISkeletonCustomerDocument, ISkeletonContractProcess)25 from ikobacustom. skeleton.interfaces import MessageFactory as _23 from ikobacustom.aaue.customers.interfaces import ( 24 IAAUECustomer, IAAUECustomerDocument, IAAUEContractProcess) 25 from ikobacustom.aaue.interfaces import MessageFactory as _ 26 26 27 class SkeletonCustomerExporter(CustomerExporter):27 class AAUECustomerExporter(CustomerExporter): 28 28 """Exporter for Customers. 29 29 """ 30 iface = I SkeletonCustomer31 title = _(u' SkeletonCustomers')30 iface = IAAUECustomer 31 title = _(u'AAUE Customers') 32 32 33 33 34 class SkeletonCustomerDocumentExporter(CustomerDocumentExporterBase):34 class AAUECustomerDocumentExporter(CustomerDocumentExporterBase): 35 35 """Exporter for documents. 36 36 """ 37 grok.name(' skeletoncustomerdocuments')38 iface = I SkeletonCustomerDocument39 title = _(u' SkeletonCustomer Documents')40 class_name = ' SkeletonCustomerDocument'37 grok.name('aauecustomerdocuments') 38 iface = IAAUECustomerDocument 39 title = _(u'AAUE Customer Documents') 40 class_name = 'AAUECustomerDocument' 41 41 42 42 43 class SkeletonContractExporter(ContractExporterBase):43 class AAUEContractExporter(ContractExporterBase): 44 44 """Exporter for Contract instances. 45 45 """ 46 grok.name(' skeletoncontracts')47 iface = I SkeletonContractProcess48 title = _(u' SkeletonCustomer Contracts')49 class_name = ' SkeletonContract'46 grok.name('aauecontracts') 47 iface = IAAUEContractProcess 48 title = _(u'AAUE Customer Contracts') 49 class_name = 'AAUEContract' -
main/ikobacustom.aaue/trunk/src/ikobacustom/aaue/customers/fileviewlets.py
r13067 r14310 23 23 FileDisplay, FileUpload, Image) 24 24 25 from ikobacustom. skeleton.customers.documents import SkeletonCustomerDocument25 from ikobacustom.aaue.customers.documents import AAUECustomerDocument 26 26 27 27 from waeup.ikoba.customers.browser import ( … … 39 39 """ 40 40 grok.order(1) 41 grok.context( SkeletonCustomerDocument)41 grok.context(AAUECustomerDocument) 42 42 grok.view(DocumentManageFormPage) 43 43 grok.require('waeup.manageCustomer') … … 61 61 """ 62 62 grok.order(1) 63 grok.context( SkeletonCustomerDocument)63 grok.context(AAUECustomerDocument) 64 64 grok.require('waeup.viewCustomer') 65 65 grok.view(DocumentDisplayFormPage) … … 74 74 """ 75 75 grok.name('sample') 76 grok.context( SkeletonCustomerDocument)76 grok.context(AAUECustomerDocument) 77 77 grok.require('waeup.viewCustomer') 78 78 download_name = u'sample' -
main/ikobacustom.aaue/trunk/src/ikobacustom/aaue/customers/interfaces.py
r12502 r14310 24 24 ConCatProductSource, CustomerDocumentSource) 25 25 from waeup.ikoba.products.productoptions import ProductOptionField 26 from ikobacustom. skeleton.interfaces import MessageFactory as _26 from ikobacustom.aaue.interfaces import MessageFactory as _ 27 27 28 28 29 class I SkeletonCustomer(ICustomer):29 class IAAUECustomer(ICustomer): 30 30 """Representation of a customer. 31 31 … … 35 35 36 36 37 class I SkeletonCustomerDocument(ICustomerDocument):37 class IAAUECustomerDocument(ICustomerDocument): 38 38 """A customer document. 39 39 … … 42 42 # Customer contract interfaces 43 43 44 class I SkeletonContract(IContract):44 class IAAUEContract(IContract): 45 45 """A customer contract sample with document attached. 46 46 … … 53 53 ) 54 54 55 class I SkeletonContractOfficialUse(IIkobaObject):55 class IAAUEContractOfficialUse(IIkobaObject): 56 56 """Interface for editing official use data. 57 57 … … 63 63 ) 64 64 65 class I SkeletonContractProcess(ISkeletonContract, ISkeletonContractOfficialUse):65 class IAAUEContractProcess(IAAUEContract, IAAUEContractOfficialUse): 66 66 """Interface for processing contract data. 67 67 """ … … 75 75 ) 76 76 77 class I SkeletonContractEdit(ISkeletonContract):77 class IAAUEContractEdit(IAAUEContract): 78 78 """Interface for editing sample contract data by customers. 79 79 -
main/ikobacustom.aaue/trunk/src/ikobacustom/aaue/customers/tests/test_browser.py
r12665 r14310 30 30 from waeup.ikoba.customers.tests.test_batching import CustomerImportExportSetup 31 31 from 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_dir32 from ikobacustom.aaue.customers.export import ( 33 AAUECustomerExporter, 34 AAUECustomerDocumentExporter, 35 AAUEContractExporter) 36 from ikobacustom.aaue.customers.batching import ( 37 AAUECustomerProcessor, 38 AAUECustomerDocumentProcessor, 39 AAUEContractProcessor) 40 from ikobacustom.aaue.testing import FunctionalLayer, samples_dir 41 41 42 42 SAMPLE_IMAGE = os.path.join(os.path.dirname(__file__), 'test_image.jpg') … … 61 61 IWorkflowState(customer).setState('started') 62 62 self.app['customers'].addCustomer(customer) 63 document = createObject(u'waeup. SkeletonCustomerDocument')63 document = createObject(u'waeup.AAUECustomerDocument') 64 64 document.title = u'My first document' 65 65 customer['documents'].addDocument(document) 66 contract = createObject(u'waeup. SkeletonContract')66 contract = createObject(u'waeup.AAUEContract') 67 67 contract.tc_dict = {'en':u'Hello World'} 68 68 customer['contracts'].addContract(contract) … … 77 77 # set values we can expect in export file 78 78 self.setup_for_export() 79 exporter = SkeletonCustomerExporter()79 exporter = AAUECustomerExporter() 80 80 exporter.export_all(self.app, self.outfile) 81 81 result = open(self.outfile, 'rb').read() … … 85 85 'K1000000,aa@aa.aa,Beate,Mueller,,,123,f,0,,,started,[]\r\n') 86 86 # We can reimport the file ... 87 processor = SkeletonCustomerProcessor()87 processor = AAUECustomerProcessor() 88 88 result = processor.doImport( 89 89 self.outfile, … … 118 118 # set values we can expect in export file 119 119 self.setup_for_export() 120 exporter = SkeletonCustomerDocumentExporter()120 exporter = AAUECustomerDocumentExporter() 121 121 exporter.export_all(self.app, self.outfile) 122 122 result = open(self.outfile, 'rb').read() 123 123 self.assertMatches(result, 124 124 'class_name,document_id,history,state,title,user_id\r\n' 125 ' SkeletonCustomerDocument,%s,'125 'AAUECustomerDocument,%s,' 126 126 '[u\'2014-12-21 17:00:36 WAT - Document created by system\'],' 127 127 'created,My first document,K1000000\r\n' 128 128 % self.document.document_id) 129 129 # We can reimport the file if we change the header (user_id -> customer_id) 130 processor = SkeletonCustomerDocumentProcessor()130 processor = AAUECustomerDocumentProcessor() 131 131 open(self.outfile, 'wb').write( 132 132 'customer_id,class_name,document_id,state,title\r\n' 133 'K1000000, SkeletonCustomerDocument,%s,started,My first title\r\n'133 'K1000000,AAUECustomerDocument,%s,started,My first title\r\n' 134 134 % self.document.document_id) 135 135 result = processor.doImport( … … 162 162 # set values we can expect in export file 163 163 self.setup_for_export() 164 exporter = SkeletonContractExporter()164 exporter = AAUEContractExporter() 165 165 exporter.export_all(self.app, self.outfile) 166 166 result = open(self.outfile, 'rb').read() … … 169 169 'fee_based,history,last_product_id,product_object,product_options,' 170 170 'state,tc_dict,title,user_id,valid_from,valid_to\r\n' 171 ' SkeletonContract,,sample,%s,,0,'171 'AAUEContract,,sample,%s,,0,' 172 172 '[u\'2014-12-21 22:26:00 WAT - Contract created by system\']' 173 173 ',,,[],created,{\'en\': u\'Hello World\'},,K1000000,,\r\n' 174 174 % self.contract.contract_id) 175 175 # We can reimport the file if we change the header (user_id -> customer_id) 176 processor = SkeletonContractProcessor()176 processor = AAUEContractProcessor() 177 177 open(self.outfile, 'wb').write( 178 178 'class_name,contract_category,contract_id,document_object,' 179 179 'history,last_product_id,product_object,product_options,' 180 180 'state,tc_dict,title,user_id\r\n' 181 ' SkeletonContract,sample,%s,,'181 'AAUEContract,sample,%s,,' 182 182 '[u\'2014-12-21 22:26:00 WAT - Contract created by system\']' 183 183 ',,,[],created,{\'en\': u\'Hello World\'},,K1000000\r\n' … … 221 221 def setup_customizable_params(self): 222 222 self._contract_category = u'sample' 223 self._document_factory = 'waeup. SkeletonCustomerDocument'224 self._contract_factory = 'waeup. SkeletonContract'223 self._document_factory = 'waeup.AAUECustomerDocument' 224 self._contract_factory = 'waeup.AAUEContract' 225 225 return 226 226 … … 304 304 def setup_customizable_params(self): 305 305 self._contract_category = u'sample' 306 self._document_factory = 'waeup. SkeletonCustomerDocument'307 self._contract_factory = 'waeup. SkeletonContract'306 self._document_factory = 'waeup.AAUECustomerDocument' 307 self._contract_factory = 'waeup.AAUEContract' 308 308 return 309 309 -
main/ikobacustom.aaue/trunk/src/ikobacustom/aaue/customers/tests/test_contract.py
r12292 r14310 28 28 from waeup.ikoba.customers.contracts import ContractsContainer 29 29 30 from ikobacustom. skeleton.testing import (FunctionalLayer, FunctionalTestCase)31 from ikobacustom. skeleton.customers.contracts import SkeletonContract32 from ikobacustom. skeleton.customers.interfaces import ISkeletonContract30 from ikobacustom.aaue.testing import (FunctionalLayer, FunctionalTestCase) 31 from ikobacustom.aaue.customers.contracts import AAUEContract 32 from ikobacustom.aaue.customers.interfaces import IAAUEContract 33 33 34 34 … … 38 38 39 39 def test_interfaces(self): 40 verify.verifyClass(I SkeletonContract, SkeletonContract)41 verify.verifyClass(ICustomerNavigation, SkeletonContract)42 verify.verifyObject(I SkeletonContract, SkeletonContract())43 verify.verifyObject(ICustomerNavigation, SkeletonContract())40 verify.verifyClass(IAAUEContract, AAUEContract) 41 verify.verifyClass(ICustomerNavigation, AAUEContract) 42 verify.verifyObject(IAAUEContract, AAUEContract()) 43 verify.verifyObject(ICustomerNavigation, AAUEContract()) 44 44 return 45 45 46 46 def test_addContract(self): 47 47 container = ContractsContainer() 48 contract = createObject(u'waeup. SkeletonContract')48 contract = createObject(u'waeup.AAUEContract') 49 49 id = contract.contract_id 50 50 container.addContract(contract) 51 51 self.assertEqual(container[id], contract) 52 52 self.assertRaises(TypeError, container.addContract, object()) 53 self.assertEqual(contract.class_name, ' SkeletonContract')53 self.assertEqual(contract.class_name, 'AAUEContract') 54 54 return -
main/ikobacustom.aaue/trunk/src/ikobacustom/aaue/customers/tests/test_customer.py
r12273 r14310 17 17 ## 18 18 """ 19 Tests for skeletoncustomers.19 Tests for aaue customers. 20 20 """ 21 21 import tempfile … … 30 30 from waeup.ikoba.customers.container import CustomersContainer 31 31 32 from ikobacustom. skeleton.testing import (FunctionalLayer, FunctionalTestCase)33 from ikobacustom. skeleton.customers.customer import SkeletonCustomer34 from ikobacustom. skeleton.customers.interfaces import ISkeletonCustomer32 from ikobacustom.aaue.testing import (FunctionalLayer, FunctionalTestCase) 33 from ikobacustom.aaue.customers.customer import AAUECustomer 34 from ikobacustom.aaue.customers.interfaces import IAAUECustomer 35 35 36 class SkeletonCustomerTestCase(FunctionalTestCase):36 class AAUECustomerTestCase(FunctionalTestCase): 37 37 38 38 layer = FunctionalLayer 39 39 40 40 def setUp(self): 41 super( SkeletonCustomerTestCase, self).setUp()41 super(AAUECustomerTestCase, self).setUp() 42 42 43 43 # Prepopulate ZODB … … 52 52 53 53 def test_interfaces(self): 54 verify.verifyClass(I SkeletonCustomer, SkeletonCustomer)55 verify.verifyClass(ICustomerNavigation, SkeletonCustomer)56 verify.verifyObject(I SkeletonCustomer, SkeletonCustomer())57 verify.verifyObject(ICustomerNavigation, SkeletonCustomer())54 verify.verifyClass(IAAUECustomer, AAUECustomer) 55 verify.verifyClass(ICustomerNavigation, AAUECustomer) 56 verify.verifyObject(IAAUECustomer, AAUECustomer()) 57 verify.verifyObject(ICustomerNavigation, AAUECustomer()) 58 58 return 59 59 60 def test_add SkeletonCustomer(self):60 def test_addAAUECustomer(self): 61 61 customer = createObject(u'waeup.Customer') 62 verify.verifyObject(I SkeletonCustomer, customer)62 verify.verifyObject(IAAUECustomer, customer) 63 63 self.app['customers'].addCustomer(customer) 64 64 self.assertEqual(customer.customer_id, 'K1000000') … … 68 68 def tearDown(self): 69 69 shutil.rmtree(self.dc_root) 70 super( SkeletonCustomerTestCase, self).tearDown()70 super(AAUECustomerTestCase, self).tearDown() 71 71 return -
main/ikobacustom.aaue/trunk/src/ikobacustom/aaue/customers/tests/test_document.py
r12292 r14310 28 28 from waeup.ikoba.customers.documents import CustomerDocumentsContainer 29 29 30 from ikobacustom. skeleton.testing import (FunctionalLayer, FunctionalTestCase)31 from ikobacustom. skeleton.customers.documents import SkeletonCustomerDocument32 from ikobacustom. skeleton.customers.interfaces import ISkeletonCustomerDocument30 from ikobacustom.aaue.testing import (FunctionalLayer, FunctionalTestCase) 31 from ikobacustom.aaue.customers.documents import AAUECustomerDocument 32 from ikobacustom.aaue.customers.interfaces import IAAUECustomerDocument 33 33 34 34 … … 38 38 39 39 def test_interfaces(self): 40 verify.verifyClass(I SkeletonCustomerDocument, SkeletonCustomerDocument)41 verify.verifyClass(ICustomerNavigation, SkeletonCustomerDocument)42 verify.verifyObject(I SkeletonCustomerDocument, SkeletonCustomerDocument())43 verify.verifyObject(ICustomerNavigation, SkeletonCustomerDocument())40 verify.verifyClass(IAAUECustomerDocument, AAUECustomerDocument) 41 verify.verifyClass(ICustomerNavigation, AAUECustomerDocument) 42 verify.verifyObject(IAAUECustomerDocument, AAUECustomerDocument()) 43 verify.verifyObject(ICustomerNavigation, AAUECustomerDocument()) 44 44 return 45 45 46 46 def test_addDocument(self): 47 47 container = CustomerDocumentsContainer() 48 document = createObject(u'waeup. SkeletonCustomerDocument')48 document = createObject(u'waeup.AAUECustomerDocument') 49 49 id = document.document_id 50 50 container.addDocument(document) 51 51 self.assertEqual(container[id], document) 52 52 self.assertRaises(TypeError, container.addDocument, object()) 53 self.assertEqual(document.class_name, ' SkeletonCustomerDocument')53 self.assertEqual(document.class_name, 'AAUECustomerDocument') 54 54 return -
main/ikobacustom.aaue/trunk/src/ikobacustom/aaue/customers/utils.py
r12530 r14310 25 25 SUBMITTED, VERIFIED, REJECTED, 26 26 EXPIRED, PROVISIONALLY) 27 from ikobacustom. skeleton.interfaces import MessageFactory as _27 from ikobacustom.aaue.interfaces import MessageFactory as _ 28 28 29 class SkeletonCustomersUtils(CustomersUtils):29 class AAUECustomersUtils(CustomersUtils): 30 30 """A collection of methods subject to customization. 31 31 """ … … 47 47 #'CustomerPDFDocument': _('PDF Document'), 48 48 49 ' SkeletonCustomerDocument': _('SkeletonDocument'),49 'AAUECustomerDocument': _('AAUE Document'), 50 50 } 51 51 … … 53 53 #'SampleContract': _('Sample Contract'), 54 54 55 ' SkeletonContract': _('SkeletonContract'),55 'AAUEContract': _('AAUE Contract'), 56 56 } 57 57 … … 62 62 EXPORTER_NAMES = ( 63 63 'customers', 64 ' skeletoncustomerdocuments',65 ' skeletoncontracts')64 'aauecustomerdocuments', 65 'aauecontracts')
Note: See TracChangeset for help on using the changeset viewer.