Changeset 12260 for main/waeup.ikoba/trunk/src/waeup/ikoba/customers
- Timestamp:
- 19 Dec 2014, 08:11:12 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba/customers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/interfaces.py
r12258 r12260 23 23 from waeup.ikoba.interfaces import MessageFactory as _ 24 24 from waeup.ikoba.interfaces import ( 25 IIkobaObject, validate_email, ICSVExporter )25 IIkobaObject, validate_email, ICSVExporter, validate_uuid) 26 26 from waeup.ikoba.schema import TextLineChoice, FormattedDate, PhoneNumber 27 27 from waeup.ikoba.browser.interfaces import ICustomerNavigationBase … … 128 128 constraint=validate_email, 129 129 ) 130 130 131 phone = PhoneNumber( 131 132 title = _(u'Phone'), … … 243 244 is_editable_by_manager = Attribute('Document editable by manager') 244 245 245 246 class ICustomerPDFDocument(IDocument): 246 document_id = schema.TextLine( 247 title = _(u'Document Id'), 248 required = False, 249 constraint=validate_uuid, 250 ) 251 252 253 class ICustomerPDFDocument(ICustomerDocument): 247 254 """A customer document. 248 255 … … 282 289 title = _(u'Contract Id'), 283 290 required = False, 291 constraint=validate_uuid, 284 292 ) 285 293 -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_batching.py
r12259 r12260 337 337 dict(document_id='DOC', class_name='CustomerSampleDocument')) 338 338 self.assertEqual(len(errs),0) 339 #errs, inv_errs, conv_dict = self.processor.checkConversion(340 #dict(document_id='id with spaces', class_name='CustomerSampleDocument'))341 #self.assertEqual(len(errs),1)339 errs, inv_errs, conv_dict = self.processor.checkConversion( 340 dict(document_id='id with spaces', class_name='CustomerSampleDocument')) 341 self.assertEqual(len(errs),1) 342 342 errs, inv_errs, conv_dict = self.processor.checkConversion( 343 343 dict(document_id='DOC', class_name='WrongDocument')) … … 468 468 document_object='DOC1', product_object='SAM')) 469 469 self.assertEqual(len(errs),0) 470 #errs, inv_errs, conv_dict = self.processor.checkConversion(471 #dict(contract_id='id with spaces', class_name='SampleContract'))472 #self.assertEqual(len(errs),1)470 errs, inv_errs, conv_dict = self.processor.checkConversion( 471 dict(contract_id='id with spaces', class_name='SampleContract')) 472 self.assertEqual(len(errs),1) 473 473 errs, inv_errs, conv_dict = self.processor.checkConversion( 474 474 dict(contract_id='CON3', class_name='WrongContract'))
Note: See TracChangeset for help on using the changeset viewer.