Ignore:
Timestamp:
7 Feb 2017, 08:33:05 (8 years ago)
Author:
Henrik Bettermann
Message:

Add officer name fields do IDepartment and IFaculty. Plugins must be updated!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/university/tests/test_export.py

    r13654 r14511  
    6767        self.assertEqual(
    6868            result,
    69             'code,title,title_prefix,users_with_local_roles\r\n'
    70             'F1,Faculty of Cheese,faculty,[]\r\n'
     69            'code,title,title_prefix,users_with_local_roles,'
     70            'officer_1,officer_2\r\n'
     71            'F1,Faculty of Cheese,faculty,[],,\r\n'
    7172            )
    7273        return
     
    7980        self.assertEqual(
    8081            result,
    81             'code,title,title_prefix,users_with_local_roles\r\n'
    82             'F1,Faculty of Cheese,faculty,[]\r\n'
     82            'code,title,title_prefix,users_with_local_roles,'
     83            'officer_1,officer_2\r\n'
     84            'F1,Faculty of Cheese,faculty,[],,\r\n'
    8385            )
    8486        return
     
    9799        self.assertEqual(
    98100            result,
    99             'code,title,title_prefix,users_with_local_roles\r\n'
    100             'F1,Faculty of Cheese,faculty,[]\r\n'
    101             'F2,Centre of Onion,centre,[]\r\n'
     101            'code,title,title_prefix,users_with_local_roles,'
     102            'officer_1,officer_2\r\n'
     103            'F1,Faculty of Cheese,faculty,[],,\r\n'
     104            'F2,Centre of Onion,centre,[],,\r\n'
    102105            )
    103106        return
     
    115118        self.assertEqual(
    116119            result,
    117             'code,title,title_prefix,users_with_local_roles\r\n'
    118             'F1,Faculty of Cheese,faculty,[]\r\n'
    119             'F2,Centre of Onion,centre,[]\r\n'
     120            'code,title,title_prefix,users_with_local_roles,'
     121            'officer_1,officer_2\r\n'
     122            'F1,Faculty of Cheese,faculty,[],,\r\n'
     123            'F2,Centre of Onion,centre,[],,\r\n'
    120124            )
    121125        return
     
    136140        container.addFaculty(self.fac1)
    137141        container.addFaculty(self.fac2)
    138         self.dept1 = Department('Department of Cheddar', 'department', 'D1')
     142        self.dept1 = Department(
     143            'Department of Cheddar', 'department', 'D1', 'HoCheese')
    139144        self.dept2 = Department('Institue of Gouda', 'institute', 'D2')
    140145        self.dept3 = Department('Department of Rings', 'department', 'D3')
     
    170175        self.assertEqual(
    171176            result,
    172             'code,faculty_code,title,title_prefix,users_with_local_roles\r\n'
     177            'code,faculty_code,title,title_prefix,users_with_local_roles,'
     178            'officer_1,officer_2,officer_3,officer_4\r\n'
    173179            'D1,F1,Department of Cheddar,department,'
    174             '"[{\'user_name\': u\'bob\', \'local_role\': u\'bobsrole\'}]"\r\n'
     180            '"[{\'user_name\': u\'bob\', \'local_role\': u\'bobsrole\'}]",'
     181            'HoCheese,,,\r\n'
    175182            )
    176183        return
     
    182189        self.assertEqual(
    183190            result,
    184             'code,faculty_code,title,title_prefix,users_with_local_roles\r\n'
     191            'code,faculty_code,title,title_prefix,users_with_local_roles,'
     192            'officer_1,officer_2,officer_3,officer_4\r\n'
    185193            'D1,F1,Department of Cheddar,department,'
    186             '"[{\'user_name\': u\'bob\', \'local_role\': u\'bobsrole\'}]"\r\n'
    187             'D2,F1,Institue of Gouda,institute,[]\r\n'
     194            '"[{\'user_name\': u\'bob\', \'local_role\': u\'bobsrole\'}]",'
     195            'HoCheese,,,\r\n'
     196            'D2,F1,Institue of Gouda,institute,[],,,,\r\n'
    188197            )
    189198        return
     
    196205        self.assertEqual(
    197206            result,
    198             'code,faculty_code,title,title_prefix,users_with_local_roles\r\n'
     207            'code,faculty_code,title,title_prefix,users_with_local_roles,'
     208            'officer_1,officer_2,officer_3,officer_4\r\n'
    199209            'D1,F1,Department of Cheddar,department,'
    200             '"[{\'user_name\': u\'bob\', \'local_role\': u\'bobsrole\'}]"\r\n'
    201             'D2,F1,Institue of Gouda,institute,[]\r\n'
    202             'D3,F2,Department of Rings,department,[]\r\n'
     210            '"[{\'user_name\': u\'bob\', \'local_role\': u\'bobsrole\'}]",'
     211            'HoCheese,,,\r\n'
     212            'D2,F1,Institue of Gouda,institute,[],,,,\r\n'
     213            'D3,F2,Department of Rings,department,[],,,,\r\n'
    203214            )
    204215        return
     
    210221        self.assertEqual(
    211222            result,
    212             'code,faculty_code,title,title_prefix,users_with_local_roles\r\n'
     223            'code,faculty_code,title,title_prefix,users_with_local_roles,'
     224            'officer_1,officer_2,officer_3,officer_4\r\n'
    213225            'D1,F1,Department of Cheddar,department,'
    214             '"[{\'user_name\': u\'bob\', \'local_role\': u\'bobsrole\'}]"\r\n'
    215             'D2,F1,Institue of Gouda,institute,[]\r\n'
    216             'D3,F2,Department of Rings,department,[]\r\n'
     226            '"[{\'user_name\': u\'bob\', \'local_role\': u\'bobsrole\'}]",'
     227            'HoCheese,,,\r\n'
     228            'D2,F1,Institue of Gouda,institute,[],,,,\r\n'
     229            'D3,F2,Department of Rings,department,[],,,,\r\n'
    217230            )
    218231        return
Note: See TracChangeset for help on using the changeset viewer.