Ignore:
Timestamp:
14 Jun 2012, 08:51:01 (13 years ago)
Author:
uli
Message:

Applicants container exporter lacked a field which made exports unimportable.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/applicants
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/export.py

    r8381 r8724  
    2121from zope.catalog.interfaces import ICatalog
    2222from zope.component import queryUtility
    23 from waeup.kofa.applicants.interfaces import IApplicantBaseData
     23from waeup.kofa.applicants.interfaces import (
     24    IApplicantBaseData, IApplicantsContainer)
    2425from waeup.kofa.interfaces import ICSVExporter
    2526from waeup.kofa.interfaces import MessageFactory as _
    2627from waeup.kofa.utils.batching import ExporterBase
     28from waeup.kofa.utils.helpers import iface_names
    2729
    2830class ApplicantsContainerExporter(grok.GlobalUtility, ExporterBase):
     
    3335
    3436    #: Fieldnames considered by this exporter
    35     fields = ('code', 'title', 'prefix', 'year',
    36               'application_category', 'description',
    37               'startdate', 'enddate', 'strict_deadline')
    38 
     37    fields = tuple(sorted(iface_names(IApplicantsContainer)))
    3938    #: The title under which this exporter will be displayed
    4039    title = _(u'Basic Applicants Containers')
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_export.py

    r8377 r8724  
    66import unittest
    77from zope.catalog.interfaces import ICatalog
    8 from zope.component import queryUtility, getUtility, getUtilitiesFor
     8from zope.component import queryUtility, getUtility
    99from zope.interface.verify import verifyObject, verifyClass
    1010from zope.intid.interfaces import IIntIds
     
    7171        self.assertEqual(
    7272            result,
    73             'code,title,prefix,year,application_category,'
    74             'description,startdate,enddate,strict_deadline\r\n'
    75 
    76             'dp2012,General Studies 2012/13,app,2012,basic,'
     73            'application_category,application_fee,code,description,'
     74            'enddate,mode,prefix,startdate,strict_deadline,title,year\r\n'
     75
     76            'basic,0.0,dp2012,'
    7777            '"Some Description\nwith linebreak\n<<de>>man spriht deutsh",'
    78             '2012-01-01 12:00:00+00:00,2012-01-31 23:00:00+00:00,1\r\n'
     78            '2012-01-31 23:00:00+00:00,,app,2012-01-01 12:00:00+00:00,1,'
     79            'General Studies 2012/13,2012\r\n'
    7980            )
    8081        return
Note: See TracChangeset for help on using the changeset viewer.