Ignore:
Timestamp:
26 Sep 2013, 08:17:05 (11 years ago)
Author:
Henrik Bettermann
Message:

The the container keyword should be the container ode and not the container object itself.

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

    r10653 r10654  
    122122        be returned.
    123123        """
    124         return self.export(kw['container'].values(), filepath=filepath)
     124        container = grok.getSite()['applicants'][kw['container']]
     125        return self.export(container.values(), filepath=filepath)
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_export.py

    r10653 r10654  
    205205        self.applicant = self.setup_applicant(self.applicant)
    206206        exporter = ApplicantsExporter()
    207         exporter.export_filtered(self.app, self.outfile, container=self.container)
     207        exporter.export_filtered(
     208            self.app, self.outfile, container=self.container.code)
    208209        result = open(self.outfile, 'rb').read()
    209210        self.assertTrue(
     
    223224        # In empty container no applicants are exported
    224225        container = ApplicantsContainer()
    225         exporter.export_filtered(self.app, self.outfile, container=container)
     226        container.code = u'anything'
     227        self.app['applicants']['anything'] = self.container
     228        exporter.export_filtered(
     229            self.app, self.outfile, container=container.code)
    226230        result = open(self.outfile, 'rb').read()
    227231        self.assertTrue(
Note: See TracChangeset for help on using the changeset viewer.