Ignore:
Timestamp:
21 Mar 2012, 13:50:16 (13 years ago)
Author:
Henrik Bettermann
Message:

Rename importers to processors.

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

Legend:

Unmodified
Added
Removed
  • main/waeup.custom/trunk/src/waeup/custom/applicants/batching.py

    r7853 r7934  
    2020
    2121import grok
    22 from waeup.kofa.applicants.batching import ApplicantImporter
     22from waeup.kofa.applicants.batching import ApplicantProcessor
    2323from waeup.custom.applicants.interfaces import IPGApplicant
    2424
    25 class PGApplicantImporter(ApplicantImporter):
     25class PGApplicantProcessor(ApplicantProcessor):
    2626    """A batch processor for IPGApplicant objects.
    2727    """
    28     util_name = 'pgapplicantimporter'
     28    util_name = 'pgapplicantprocessor'
    2929    grok.name(util_name)
    30     name = u'PG Applicant Importer'
     30    name = u'PG Applicant Processor'
    3131    iface = IPGApplicant
    3232    factory_name = 'waeup.PGApplicant'
  • main/waeup.custom/trunk/src/waeup/custom/applicants/tests.py

    r7866 r7934  
    3131from waeup.custom.applicants.container import PGApplicantsContainer
    3232from waeup.custom.applicants.applicant import PGApplicant
    33 from waeup.custom.applicants.batching import PGApplicantImporter
     33from waeup.custom.applicants.batching import PGApplicantProcessor
    3434from waeup.custom.applicants.interfaces import IPGApplicant, IPGApplicantEdit
    3535
     
    4040    '\n')[0].split(',')
    4141
    42 class PGApplicantImporterTest(FunctionalTestCase):
     42class PGApplicantProcessorTest(FunctionalTestCase):
    4343    """Perform some batching tests.
    4444    """
     
    4646
    4747    def setUp(self):
    48         super(PGApplicantImporterTest, self).setUp()
     48        super(PGApplicantProcessorTest, self).setUp()
    4949        # Setup a sample site for each test
    5050        app = University()
     
    8686        self.applicant = self.app['applicants']['pg2011'][
    8787            self.application_number]
    88         self.importer = PGApplicantImporter()
     88        self.processor = PGApplicantProcessor()
    8989        self.workdir = tempfile.mkdtemp()
    9090        self.csv_file = os.path.join(self.workdir, 'sample_applicant_data.csv')
     
    9292
    9393    def tearDown(self):
    94         super(PGApplicantImporterTest, self).tearDown()
     94        super(PGApplicantProcessorTest, self).tearDown()
    9595        shutil.rmtree(self.workdir)
    9696        shutil.rmtree(self.dc_root)
     
    100100    def test_interfaces(self):
    101101        # Make sure we fulfill the interface contracts.
    102         assert verifyObject(IBatchProcessor, self.importer) is True
     102        assert verifyObject(IBatchProcessor, self.processor) is True
    103103        assert verifyClass(
    104             IBatchProcessor, PGApplicantImporter) is True
     104            IBatchProcessor, PGApplicantProcessor) is True
    105105        assert verifyObject(IPGApplicant, self.applicant) is True
    106106        assert verifyClass(
     
    118118
    119119    def test_import(self):
    120         num, num_warns, fin_file, fail_file = self.importer.doImport(
     120        num, num_warns, fin_file, fail_file = self.processor.doImport(
    121121            self.csv_file, APPLICANT_HEADER_FIELDS)
    122122        self.assertEqual(num_warns,0)
Note: See TracChangeset for help on using the changeset viewer.