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

Rename importers to processors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.custom/trunk/src/waeup/custom/students/tests/test_browser.py

    r7928 r7934  
    3535    '\n')[0].split(',')
    3636
    37 class StudentImporterTest(FunctionalTestCase):
     37class StudentProcessorTest(FunctionalTestCase):
    3838    """Perform some batching tests.
    3939    """
     
    4242
    4343    def setUp(self):
    44         super(StudentImporterTest, self).setUp()
     44        super(StudentProcessorTest, self).setUp()
    4545        # Setup a sample site for each test
    4646        app = University()
     
    5858        setSite(app)
    5959
    60         self.importer_base = StudentProcessorBase()
    61         self.importer = StudentProcessor()
     60        self.processor_base = StudentProcessorBase()
     61        self.processor = StudentProcessor()
    6262        self.workdir = tempfile.mkdtemp()
    6363        self.csv_file = os.path.join(self.workdir, 'sample_student_data.csv')
     
    6565
    6666    def tearDown(self):
    67         super(StudentImporterTest, self).tearDown()
     67        super(StudentProcessorTest, self).tearDown()
    6868        shutil.rmtree(self.workdir)
    6969        shutil.rmtree(self.dc_root)
     
    7373    def test_import(self):
    7474        # We added empty columns 'nationality' and 'lga' to the import file.
    75         # The original importer will fail because these fields are required
     75        # The original processor will fail because these fields are required
    7676        # in the base package.
    77         num, num_warns, fin_file, fail_file = self.importer_base.doImport(
     77        num, num_warns, fin_file, fail_file = self.processor_base.doImport(
    7878            self.csv_file, STUDENT_HEADER_FIELDS)
    7979        self.assertEqual(num_warns,3)
    8080        assert len(self.app['students'].keys()) == 0
    81         # The customized importer does not complain since both fields are
     81        # The customized processor does not complain since both fields are
    8282        # not required in the custom package.
    83         num, num_warns, fin_file, fail_file = self.importer.doImport(
     83        num, num_warns, fin_file, fail_file = self.processor.doImport(
    8484            self.csv_file, STUDENT_HEADER_FIELDS)
    8585        self.assertEqual(num_warns,0)
Note: See TracChangeset for help on using the changeset viewer.