- Timestamp:
- 30 Nov 2011, 23:13:26 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_catalog.py
r7193 r7240 58 58 # Create an applicant in an applicants container 59 59 self.container = ApplicantsContainer() 60 self.container.code = u"mystuff" 60 61 setSite(self.app) 61 62 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 66 66 return 67 67 … … 80 80 self.create_applicant() 81 81 q = getUtility(IQuery) 82 subquery = Eq(('applicants_catalog', 'access_code'), self.ac) 82 subquery = Eq(('applicants_catalog', 'applicant_id'), 83 self.applicant.applicant_id) 83 84 results = list(q.searchResults(subquery)) 84 85 self.assertEqual(len(results), 1) 85 86 86 result_applicant = results[0] 87 87 self.assertTrue(isinstance(result_applicant, Applicant)) 88 self.assertEqual(result_applicant.a ccess_code, self.ac)88 self.assertEqual(result_applicant.applicant_id, self.applicant.applicant_id)
Note: See TracChangeset for help on using the changeset viewer.