Ignore:
Timestamp:
26 Apr 2012, 14:13:51 (13 years ago)
Author:
Henrik Bettermann
Message:

Rename reg_state to state to be in accordance with applicants.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/students/tests
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_student_data.csv

    r8284 r8287  
    1 student_id,firstname,lastname,reg_number,date_of_birth,matric_number,email,phone,sex,reg_state
     1student_id,firstname,lastname,reg_number,date_of_birth,matric_number,email,phone,sex,state
    22X666666,Aaren,Pieri,1,1990-01-02,100000,aa@aa.ng,1234,m,courses validated
    33Y777777,Claus,Finau,2,1990-01-03,100001,aa@aa.ng,1234,m,courses validated
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_student_data_migration.csv

    r8284 r8287  
    1 student_id,firstname,lastname,reg_number,date_of_birth,matric_number,email,phone,password,sex,reg_state
     1student_id,firstname,lastname,reg_number,date_of_birth,matric_number,email,phone,password,sex,state
    22A123456,Aaren,Pieri,1,1990-01-02#,100000,aa@aa.ng,1234,mypw1,m,clearance started
    33B123456,Aaren,Finau,2,1990-01-03,100001,aa@aa.ng,1234,mypw1,m,cleared
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_student_data_update.csv

    r8284 r8287  
    1 reg_number,date_of_birth,matric_number,reg_state
     1reg_number,date_of_birth,matric_number,state
    221,1980-01-02,10,admitted
    332,1980-01-03,11,
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py

    r8284 r8287  
    220220    def test_checkConversion(self):
    221221        errs, inv_errs, conv_dict = self.processor.checkConversion(
    222             dict(reg_number='1', reg_state='admitted'))
    223         self.assertEqual(len(errs),0)
    224         # Empty reg_state is allowed
    225         errs, inv_errs, conv_dict = self.processor.checkConversion(
    226             dict(reg_number='1', reg_state=''))
    227         self.assertEqual(len(errs),0)
    228         #self.assertTrue(('reg_state', 'no value provided') in errs)
    229         errs, inv_errs, conv_dict = self.processor.checkConversion(
    230             dict(reg_number='1', reg_state='nonsense'))
     222            dict(reg_number='1', state='admitted'))
     223        self.assertEqual(len(errs),0)
     224        # Empty state is allowed
     225        errs, inv_errs, conv_dict = self.processor.checkConversion(
     226            dict(reg_number='1', state=''))
     227        self.assertEqual(len(errs),0)
     228        #self.assertTrue(('state', 'no value provided') in errs)
     229        errs, inv_errs, conv_dict = self.processor.checkConversion(
     230            dict(reg_number='1', state='nonsense'))
    231231        self.assertEqual(len(errs),1)
    232         self.assertTrue(('reg_state', 'not allowed') in errs)
     232        self.assertTrue(('state', 'not allowed') in errs)
    233233
    234234    def test_delEntry(self):
     
    254254            self.csv_file_update, STUDENT_HEADER_FIELDS_UPDATE, 'update')
    255255        self.assertEqual(num_warns,0)
    256         # reg_state has changed
     256        # state has changed
    257257        self.assertEqual(self.app['students']['X666666'].state,'admitted')
    258         # reg_state has not changed
     258        # state has not changed
    259259        self.assertEqual(self.app['students']['Y777777'].state,'courses validated')
    260260        shutil.rmtree(os.path.dirname(fin_file))
     
    301301        self.assertEqual(
    302302            content,
    303             'reg_number,firstname,student_id,sex,email,phone,date_of_birth,reg_state,lastname,password,matric_number,--ERRORS--\r\n'
    304             '4,John,D123456,m,aa@aa.ng,1234,1990-01-05,nonsense,Wolter,mypw1,100003,reg_state: not allowed\r\n'
    305             '5,John,E123456,x,aa@aa.ng,1234,1990-01-06,,Kennedy,,100004,sex: Invalid value\r\n'
     303            'reg_number,firstname,student_id,sex,email,phone,state,date_of_birth,lastname,password,matric_number,--ERRORS--\r\n'
     304            '4,John,D123456,m,aa@aa.ng,1234,nonsense,1990-01-05,Wolter,mypw1,100003,state: not allowed\r\n'
     305            '5,John,E123456,x,aa@aa.ng,1234,,1990-01-06,Kennedy,,100004,sex: Invalid value\r\n'
    306306            )
    307307        self.assertTrue('A123456' in self.app['students'].keys())
     
    317317        self.assertTrue(
    318318            "State 'clearance started' set by system" in history)
    319         # reg_state was empty and student is thus in state created
     319        # state was empty and student is thus in state created
    320320        self.assertEqual(self.app['students']['F123456'].state,'created')
    321321        shutil.rmtree(os.path.dirname(fin_file))
Note: See TracChangeset for help on using the changeset viewer.