- Timestamp:
- 1 Feb 2015, 07:44:27 (10 years ago)
- Location:
- main/ikobacustom.skeleton/trunk/src/ikobacustom/skeleton/customers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/ikobacustom.skeleton/trunk/src/ikobacustom/skeleton/customers/browser.py
r12530 r12539 18 18 19 19 from zope.component import getUtility 20 from waeup.ikoba.interfaces import IIkobaUtils 20 from waeup.ikoba.interfaces import IIkobaUtils, IExtFileStore 21 21 from waeup.ikoba.customers.browser import ( 22 22 PDFContractSlipPage, CustomerBaseEditFormPage) … … 38 38 39 39 def dataNotComplete(self): 40 """To be implemented in the customization package. 41 """ 42 return False 40 store = getUtility(IExtFileStore) 41 error = '' 42 if not store.getFileByContext(self.context, attr=u'passport.jpg'): 43 error += _('Passport picture is missing.') 44 if error: 45 return error 46 return -
main/ikobacustom.skeleton/trunk/src/ikobacustom/skeleton/customers/tests/test_browser.py
r12502 r12539 58 58 customer.reg_number = u'123' 59 59 customer.sex = u'f' 60 customer.email = u'aa@aa.aa' 60 61 IWorkflowState(customer).setState('started') 61 62 self.app['customers'].addCustomer(customer) … … 82 83 'customer_id,email,firstname,lastname,middlename,phone,' 83 84 'reg_number,sex,suspended,suspended_comment,password,state,history\r\n' 84 'K1000000, ,Beate,Mueller,,,123,f,0,,,started,[]\r\n')85 'K1000000,aa@aa.aa,Beate,Mueller,,,123,f,0,,,started,[]\r\n') 85 86 # We can reimport the file ... 86 87 processor = SkeletonCustomerProcessor() … … 101 102 num_succ, num_fail, finished_path, failed_path = result 102 103 self.assertEqual(num_fail,0) 103 # We can import the same file in update mode if we ignore the reg_number. 104 result = processor.doImport( 105 self.outfile, 106 ['customer_id','email','firstname','lastname','middlename','phone', 104 # We can import the same file in update mode if we ignore 105 # the reg_number and email address 106 result = processor.doImport( 107 self.outfile, 108 ['customer_id','xx_email','firstname','lastname','middlename','phone', 107 109 'xx_reg_number','sex','suspended','suspended_comment','password','state'], 108 110 mode='update')
Note: See TracChangeset for help on using the changeset viewer.