Changeset 7912 for main/waeup.kofa/trunk
- Timestamp:
- 19 Mar 2012, 01:55:47 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_batching.py
r7909 r7912 164 164 shutil.rmtree(os.path.dirname(fin_file)) 165 165 166 class ApplicantImport erTest(FunctionalTestCase):166 class ApplicantImportExportSetup(FunctionalTestCase): 167 167 168 168 layer = FunctionalLayer 169 169 170 170 def setUp(self): 171 super(ApplicantImport erTest, self).setUp()171 super(ApplicantImportExportSetup, self).setUp() 172 172 # Setup a sample site for each test 173 173 app = University() … … 204 204 applicant = Applicant() 205 205 applicant.firstname = u'Anna' 206 applicant. firstname = u'Tester'206 applicant.lastname = u'Tester' 207 207 self.app['applicants']['dp2011'].addApplicant(applicant) 208 208 self.application_number = applicant.application_number 209 209 self.applicant = self.app['applicants']['dp2011'][ 210 210 self.application_number] 211 self.workdir = tempfile.mkdtemp() 212 return 213 214 def tearDown(self): 215 super(ApplicantImportExportSetup, self).tearDown() 216 shutil.rmtree(self.workdir) 217 shutil.rmtree(self.dc_root) 218 clearSite() 219 return 220 221 class ApplicantImporterTest(ApplicantImportExportSetup): 222 223 layer = FunctionalLayer 224 225 def setUp(self): 226 super(ApplicantImporterTest, self).setUp() 211 227 self.importer = ApplicantImporter() 212 self.workdir = tempfile.mkdtemp()213 228 self.csv_file = os.path.join(self.workdir, 'sample_applicant_data.csv') 214 229 self.csv_file_faulty = os.path.join(self.workdir, … … 219 234 open(self.csv_file_faulty, 'wb').write(FAULTY_APPLICANT_SAMPLE_DATA) 220 235 open(self.csv_file_update, 'wb').write(APPLICANT_SAMPLE_DATA_UPDATE) 221 222 def tearDown(self):223 super(ApplicantImporterTest, self).tearDown()224 shutil.rmtree(self.workdir)225 shutil.rmtree(self.dc_root)226 clearSite()227 return228 236 229 237 def test_interface(self):
Note: See TracChangeset for help on using the changeset viewer.