Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/applicant.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/applicant.py	(revision 13079)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/applicant.py	(revision 13080)
@@ -84,9 +84,17 @@
     @property
     def container_code(self):
-        return self.__parent__.code
+        try:
+            code = self.__parent__.code
+        except AttributeError:  # in unit tests
+            return
+        return code
 
     @property
     def translated_state(self):
-        return application_states_dict[self.state]
+        try:
+            state = application_states_dict[self.state]
+        except LookupError:  # in unit tests
+            return
+        return state
 
     @property
@@ -97,5 +105,9 @@
     @property
     def special(self):
-        return self.__parent__.prefix.startswith('special')
+        try:
+            special = self.__parent__.prefix.startswith('special')
+        except AttributeError:  # in unit tests
+            return
+        return special
 
     @property
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/export.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/export.py	(revision 13079)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/export.py	(revision 13080)
@@ -79,5 +79,7 @@
     grok.name('applicants')
 
-    fields = tuple(sorted(IApplicantBaseData.names())) + ('container_code',)
+    fields = tuple(sorted(iface_names(IApplicantBaseData))) + (
+        'password', 'state', 'history', 'container_code', 'application_number',
+        'display_fullname', 'application_date')
     title = _(u'Applicants')
 
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py	(revision 13079)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py	(revision 13080)
@@ -327,4 +327,143 @@
     state, depending on use-case.
     """
+    state = Attribute('Application state of an applicant')
+    history = Attribute('Object history, a list of messages')
+    display_fullname = Attribute('The fullname of an applicant')
+    application_number = Attribute('The key under which the record is stored')
+    container_code = Attribute('Code of the parent container')
+    translated_state = Attribute('Real name of the application state')
+    special = Attribute('True if special application')
+    application_number = Attribute('The key under which the record is stored')
+
+    application_date = Attribute('UTC datetime of submission, used for export only')
+    password = Attribute('Encrypted password of a applicant')
+
+
+    suspended = schema.Bool(
+        title = _(u'Account suspended'),
+        default = False,
+        required = False,
+        )
+
+    applicant_id = schema.TextLine(
+        title = _(u'Applicant Id'),
+        required = False,
+        readonly = False,
+        )
+
+    reg_number = TextLineChoice(
+        title = _(u'Registration Number'),
+        readonly = False,
+        required = True,
+        source = contextual_reg_num_source,
+        )
+
+    firstname = schema.TextLine(
+        title = _(u'First Name'),
+        required = True,
+        )
+
+    middlename = schema.TextLine(
+        title = _(u'Middle Name'),
+        required = False,
+        )
+
+    lastname = schema.TextLine(
+        title = _(u'Last Name (Surname)'),
+        required = True,
+        )
+
+    date_of_birth = FormattedDate(
+        title = _(u'Date of Birth'),
+        required = False,
+        show_year = True,
+        )
+
+    sex = schema.Choice(
+        title = _(u'Sex'),
+        source = GenderSource(),
+        required = True,
+        )
+
+    email = schema.ASCIILine(
+        title = _(u'Email Address'),
+        required = False,
+        constraint=validate_email,
+        )
+
+    phone = PhoneNumber(
+        title = _(u'Phone'),
+        description = u'',
+        required = False,
+        )
+
+    course1 = schema.Choice(
+        title = _(u'1st Choice Course of Study'),
+        source = AppCatCertificateSource(),
+        required = True,
+        )
+
+    course2 = schema.Choice(
+        title = _(u'2nd Choice Course of Study'),
+        source = AppCatCertificateSource(),
+        required = False,
+        )
+
+    #school_grades = schema.List(
+    #    title = _(u'School Grades'),
+    #    value_type = ResultEntryField(),
+    #    required = False,
+    #    default = [],
+    #    )
+
+    notice = schema.Text(
+        title = _(u'Notice'),
+        required = False,
+        )
+    student_id = schema.TextLine(
+        title = _(u'Student Id'),
+        required = False,
+        readonly = False,
+        )
+    course_admitted = schema.Choice(
+        title = _(u'Admitted Course of Study'),
+        source = CertificateSource(),
+        required = False,
+        )
+    locked = schema.Bool(
+        title = _(u'Form locked'),
+        default = False,
+        required = False,
+        )
+
+    special_application = schema.Choice(
+        title = _(u'Special Application'),
+        source = SpecialApplicationSource(),
+        required = False,
+        )
+
+class IApplicant(IApplicantBaseData):
+    """This is basically the applicant base data. Here we repeat the
+    fields from base data if we have to set the `required` attribute
+    to True (which is the default).
+    """
+
+    def writeLogMessage(view, comment):
+        """Adds an INFO message to the log file
+        """
+
+    def createStudent():
+        """Create a student object from applicatnt data
+        and copy applicant object.
+        """
+
+class ISpecialApplicant(IApplicantBase):
+    """This reduced interface is for former students or students who are not
+    student users of the portal but have to pay supplementary fees.
+
+    This interface is used in browser components only. Thus we can't add
+    fields here to the regular IApplicant interface here. We can
+    only 'customize' fields.
+    """
     history = Attribute('Object history, a list of messages')
     state = Attribute('The application state of an applicant')
@@ -340,137 +479,4 @@
         )
 
-    applicant_id = schema.TextLine(
-        title = _(u'Applicant Id'),
-        required = False,
-        readonly = False,
-        )
-
-    reg_number = TextLineChoice(
-        title = _(u'Registration Number'),
-        readonly = False,
-        required = True,
-        source = contextual_reg_num_source,
-        )
-
-    firstname = schema.TextLine(
-        title = _(u'First Name'),
-        required = True,
-        )
-
-    middlename = schema.TextLine(
-        title = _(u'Middle Name'),
-        required = False,
-        )
-
-    lastname = schema.TextLine(
-        title = _(u'Last Name (Surname)'),
-        required = True,
-        )
-
-    date_of_birth = FormattedDate(
-        title = _(u'Date of Birth'),
-        required = False,
-        show_year = True,
-        )
-
-    sex = schema.Choice(
-        title = _(u'Sex'),
-        source = GenderSource(),
-        required = True,
-        )
-
-    email = schema.ASCIILine(
-        title = _(u'Email Address'),
-        required = False,
-        constraint=validate_email,
-        )
-
-    phone = PhoneNumber(
-        title = _(u'Phone'),
-        description = u'',
-        required = False,
-        )
-
-    course1 = schema.Choice(
-        title = _(u'1st Choice Course of Study'),
-        source = AppCatCertificateSource(),
-        required = True,
-        )
-
-    course2 = schema.Choice(
-        title = _(u'2nd Choice Course of Study'),
-        source = AppCatCertificateSource(),
-        required = False,
-        )
-
-    #school_grades = schema.List(
-    #    title = _(u'School Grades'),
-    #    value_type = ResultEntryField(),
-    #    required = False,
-    #    default = [],
-    #    )
-
-    notice = schema.Text(
-        title = _(u'Notice'),
-        required = False,
-        )
-    student_id = schema.TextLine(
-        title = _(u'Student Id'),
-        required = False,
-        readonly = False,
-        )
-    course_admitted = schema.Choice(
-        title = _(u'Admitted Course of Study'),
-        source = CertificateSource(),
-        required = False,
-        )
-    locked = schema.Bool(
-        title = _(u'Form locked'),
-        default = False,
-        required = False,
-        )
-
-    special_application = schema.Choice(
-        title = _(u'Special Application'),
-        source = SpecialApplicationSource(),
-        required = False,
-        )
-
-class IApplicant(IApplicantBaseData):
-    """This is basically the applicant base data. Here we repeat the
-    fields from base data if we have to set the `required` attribute
-    to True (which is the default).
-    """
-
-    def writeLogMessage(view, comment):
-        """Adds an INFO message to the log file
-        """
-
-    def createStudent():
-        """Create a student object from applicatnt data
-        and copy applicant object.
-        """
-
-class ISpecialApplicant(IApplicantBase):
-    """This reduced interface is for former students or students who are not
-    student users of the portal but have to pay supplementary fees.
-
-    This interface is used in browser components only. Thus we can't add
-    fields here to the regular IApplicant interface here. We can
-    only 'customize' fields.
-    """
-    history = Attribute('Object history, a list of messages')
-    state = Attribute('The application state of an applicant')
-    display_fullname = Attribute('The fullname of an applicant')
-    application_date = Attribute('UTC datetime of submission, used for export only')
-    password = Attribute('Encrypted password of a applicant')
-    application_number = Attribute('The key under which the record is stored')
-
-    suspended = schema.Bool(
-        title = _(u'Account suspended'),
-        default = False,
-        required = False,
-        )
-
     locked = schema.Bool(
         title = _(u'Form locked'),
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_export.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_export.py	(revision 13079)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_export.py	(revision 13080)
@@ -139,14 +139,13 @@
         # into two parts.
         self.assertTrue(
-            'applicant_id,application_date,application_number,course1,course2,'
-            'course_admitted,date_of_birth,display_fullname,email,firstname,'
-            'history,lastname,locked,middlename,notice,password,phone,'
-            'reg_number,sex,special_application,state,'
-            'student_id,suspended,container_code\r\n'
-            'dp2011_654321,,654321,,,,,Anna Tester,,Anna,'
-            in result)
-        self.assertTrue(
-            'Application initialized by system\'],Tester,'
-            '0,,,,,,,,initialized,,0,dp2011\r\n'
+            'applicant_id,course1,course2,course_admitted,date_of_birth,'
+            'email,firstname,lastname,locked,middlename,notice,phone,'
+            'reg_number,sex,special_application,student_id,suspended,'
+            'password,state,history,container_code,application_number,'
+            'display_fullname,application_date\r\n'
+            'dp2011_654321,,,,,,Anna,Tester,0'
+            in result)
+        self.assertTrue(
+            'Application initialized by system\'],dp2011,654321,Anna Tester'
             in result)
         return
@@ -163,16 +162,15 @@
         # into two parts.
         self.assertTrue(
-            'applicant_id,application_date,application_number,course1,course2,'
-            'course_admitted,date_of_birth,display_fullname,email,firstname,'
-            'history,lastname,locked,middlename,notice,password,phone,'
-            'reg_number,sex,special_application,state,'
-            'student_id,suspended,container_code\r\n'
-            'dp2011_654321,,654321,CERT1,CERT1,CERT1,1981-02-04#,'
-            'Anna M. Tester,anna@sample.com,Anna,'
-            in result)
-        self.assertTrue(
-            'Application initialized by system\'],'
-            'Tester,0,M.,"Some notice\nin lines.",any password,'
-            '+234-123-12345#,123456,f,,initialized,,0,dp2011\r\n'
+            'applicant_id,course1,course2,course_admitted,date_of_birth,'
+            'email,firstname,lastname,locked,middlename,notice,phone,'
+            'reg_number,sex,special_application,student_id,suspended,'
+            'password,state,history,container_code,application_number,'
+            'display_fullname,application_date\r\n'
+            'dp2011_654321,CERT1,CERT1,CERT1,1981-02-04#,'
+            'anna@sample.com,Anna,Tester,'
+            in result)
+        self.assertTrue(
+            'Application initialized by system\'],dp2011,654321,'
+            'Anna M. Tester,\r\n'
             in result)
 
@@ -187,16 +185,15 @@
         result = open(self.outfile, 'rb').read()
         self.assertTrue(
-            'applicant_id,application_date,application_number,course1,course2,'
-            'course_admitted,date_of_birth,display_fullname,email,firstname,'
-            'history,lastname,locked,middlename,notice,password,phone,'
-            'reg_number,sex,special_application,state,'
-            'student_id,suspended,container_code\r\n'
-            'dp2011_654321,,654321,CERT1,CERT1,CERT1,1981-02-04#,'
-            'Anna M. Tester,anna@sample.com,Anna,'
-            in result)
-        self.assertTrue(
-            'Application initialized by system\'],'
-            'Tester,0,M.,"Some notice\nin lines.",any password,'
-            '+234-123-12345#,123456,f,,initialized,,0,dp2011\r\n'
+            'applicant_id,course1,course2,course_admitted,date_of_birth,'
+            'email,firstname,lastname,locked,middlename,notice,phone,'
+            'reg_number,sex,special_application,student_id,suspended,'
+            'password,state,history,container_code,application_number,'
+            'display_fullname,application_date\r\n'
+            'dp2011_654321,CERT1,CERT1,CERT1,1981-02-04#,'
+            'anna@sample.com,Anna,Tester,'
+            in result)
+        self.assertTrue(
+            'Application initialized by system\'],dp2011,654321,'
+            'Anna M. Tester,\r\n'
             in result)
         return
@@ -209,16 +206,15 @@
         result = open(self.outfile, 'rb').read()
         self.assertTrue(
-            'applicant_id,application_date,application_number,course1,course2,'
-            'course_admitted,date_of_birth,display_fullname,email,firstname,'
-            'history,lastname,locked,middlename,notice,password,phone,'
-            'reg_number,sex,special_application,state,'
-            'student_id,suspended,container_code\r\n'
-            'dp2011_654321,,654321,CERT1,CERT1,CERT1,1981-02-04#,'
-            'Anna M. Tester,anna@sample.com,Anna,'
-            in result)
-        self.assertTrue(
-            'Application initialized by system\'],'
-            'Tester,0,M.,"Some notice\nin lines.",any password,'
-            '+234-123-12345#,123456,f,,initialized,,0,dp2011\r\n'
+            'applicant_id,course1,course2,course_admitted,date_of_birth,'
+            'email,firstname,lastname,locked,middlename,notice,phone,'
+            'reg_number,sex,special_application,student_id,suspended,'
+            'password,state,history,container_code,application_number,'
+            'display_fullname,application_date\r\n'
+            'dp2011_654321,CERT1,CERT1,CERT1,1981-02-04#,'
+            'anna@sample.com,Anna,Tester,'
+            in result)
+        self.assertTrue(
+            'Application initialized by system\'],dp2011,654321,'
+            'Anna M. Tester,\r\n'
             in result)
         # In empty container no applicants are exported
@@ -230,9 +226,9 @@
         result = open(self.outfile, 'rb').read()
         self.assertTrue(
-            'applicant_id,application_date,application_number,course1,'
-            'course2,course_admitted,date_of_birth,display_fullname,email,'
-            'firstname,history,lastname,locked,middlename,notice,password,'
-            'phone,reg_number,sex,special_application,state,student_id,'
-            'suspended,container_code\r\n'
-            in result)
-        return
+            'applicant_id,course1,course2,course_admitted,date_of_birth,'
+            'email,firstname,lastname,locked,middlename,notice,phone,'
+            'reg_number,sex,special_application,student_id,suspended,'
+            'password,state,history,container_code,application_number,'
+            'display_fullname,application_date\r\n'
+            in result)
+        return
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py	(revision 13079)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py	(revision 13080)
@@ -192,4 +192,5 @@
     history = Attribute('Object history, a list of messages')
     state = Attribute('Registration state')
+    translated_state = Attribute('Real name of the registration state')
     certcode = Attribute('Certificate code of any chosen study course')
     depcode = Attribute('Department code of any chosen study course')
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/student.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/student.py	(revision 13079)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/student.py	(revision 13080)
@@ -125,6 +125,9 @@
     @property
     def translated_state(self):
-        state = registration_states_vocab.getTermByToken(
-            self.state).title
+        try:
+            state = registration_states_vocab.getTermByToken(
+                self.state).title
+        except LookupError:  # in unit tests
+            return
         return state
 
