Ignore:
Timestamp:
30 Nov 2011, 23:13:26 (13 years ago)
Author:
Henrik Bettermann
Message:

Rebuild applicants package (1st part). Applicants now have an applicant_id and a password and can use the regular login page to enter the portal.

Add user_type attribute to SIRPPrincipal objects.

Add some permissions in students package.

Some tests are still missing and will be re-added soon.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_catalog.py

    r7193 r7240  
    5858        # Create an applicant in an applicants container
    5959        self.container = ApplicantsContainer()
     60        self.container.code = u"mystuff"
    6061        setSite(self.app)
    6162        self.app['applicants']['mystuff'] = self.container
    62         self.applicant = Applicant()
    63         self.ac = u'FOO-666-123456789'
    64         self.applicant.access_code = self.ac
    65         self.app['applicants']['mystuff'][self.ac] = self.applicant
     63        self.applicant = Applicant(container=self.container)
     64        self.app['applicants']['mystuff'][
     65            self.applicant.application_number] = self.applicant
    6666        return
    6767
     
    8080        self.create_applicant()
    8181        q = getUtility(IQuery)
    82         subquery = Eq(('applicants_catalog', 'access_code'), self.ac)
     82        subquery = Eq(('applicants_catalog', 'applicant_id'),
     83            self.applicant.applicant_id)
    8384        results = list(q.searchResults(subquery))
    8485        self.assertEqual(len(results), 1)
    85 
    8686        result_applicant = results[0]
    8787        self.assertTrue(isinstance(result_applicant, Applicant))
    88         self.assertEqual(result_applicant.access_code, self.ac)
     88        self.assertEqual(result_applicant.applicant_id, self.applicant.applicant_id)
Note: See TracChangeset for help on using the changeset viewer.