Ignore:
Timestamp:
1 Feb 2015, 07:44:27 (10 years ago)
Author:
Henrik Bettermann
Message:

Adjust to base package.

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  
    1818
    1919from zope.component import getUtility
    20 from waeup.ikoba.interfaces import IIkobaUtils
     20from waeup.ikoba.interfaces import IIkobaUtils, IExtFileStore
    2121from waeup.ikoba.customers.browser import (
    2222    PDFContractSlipPage, CustomerBaseEditFormPage)
     
    3838
    3939    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  
    5858        customer.reg_number = u'123'
    5959        customer.sex = u'f'
     60        customer.email = u'aa@aa.aa'
    6061        IWorkflowState(customer).setState('started')
    6162        self.app['customers'].addCustomer(customer)
     
    8283            'customer_id,email,firstname,lastname,middlename,phone,'
    8384            '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')
    8586        # We can reimport the file ...
    8687        processor = SkeletonCustomerProcessor()
     
    101102        num_succ, num_fail, finished_path, failed_path = result
    102103        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',
    107109            'xx_reg_number','sex','suspended','suspended_comment','password','state'],
    108110            mode='update')
Note: See TracChangeset for help on using the changeset viewer.