Index: main/waeup.uniben/trunk/src/waeup/uniben/applicants/tests/test_browser.py
===================================================================
--- main/waeup.uniben/trunk/src/waeup/uniben/applicants/tests/test_browser.py	(revision 13081)
+++ main/waeup.uniben/trunk/src/waeup/uniben/applicants/tests/test_browser.py	(revision 13552)
@@ -19,8 +19,11 @@
 Test the applicant-related UI components.
 """
+import os
 from StringIO import StringIO
 from datetime import datetime
 from hurry.workflow.interfaces import IWorkflowInfo, IWorkflowState
 from zope.securitypolicy.interfaces import IPrincipalRoleManager
+from waeup.kofa.browser.tests.test_pdf import samples_dir
+from waeup.kofa.applicants.container import ApplicantsContainer
 from waeup.uniben.testing import FunctionalLayer
 from waeup.uniben.configuration import CustomSessionConfiguration
@@ -160,2 +163,24 @@
                          'application/pdf')
         return
+
+    def test_asaba_application_slip(self):
+
+        # Remove required FieldProperty attribute first ...
+        delattr(ApplicantsContainer, 'prefix')
+        # ... and replace by asaba
+        self.applicantscontainer.prefix = 'affilasa'
+        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
+        self.slip_path = self.view_path + '/application_slip.pdf'
+        self.browser.open(self.manage_path)
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        self.fill_correct_values()
+        self.browser.getControl("Save").click()
+        IWorkflowState(self.applicant).setState('submitted')
+        self.browser.open(self.manage_path)
+        self.browser.getLink("Download application slip").click()
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        self.assertEqual(self.browser.headers['Content-Type'],
+                         'application/pdf')
+        path = os.path.join(samples_dir(), 'application_slip.pdf')
+        open(path, 'wb').write(self.browser.contents)
+        print "Sample application_slip.pdf written to %s" % path
