Ignore:
Timestamp:
16 Dec 2015, 08:45:50 (9 years ago)
Author:
Henrik Bettermann
Message:

Add more hq fields.

Re-organize OMIT field structure in views.

Location:
main/waeup.aaue/trunk/src/waeup/aaue/applicants/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/applicants/tests/test_applicantcopier.py

    r13368 r13545  
    6161        self.browser.getControl(name="form.alr_fname").value = 'Uli'
    6262        self.browser.getControl(name="form.alr_no").value = '345'
    63         self.browser.getControl(name="form.hq_type").value = ['nce']
    64         self.browser.getControl(name="form.hq_fname").value = 'Beate'
    65         self.browser.getControl(name="form.hq_matric_no").value = '444'
    66         self.browser.getControl(name="form.hq_degree").value = ['upper_credit']
    67         self.browser.getControl(name="form.hq_school").value = 'my school'
    68         self.browser.getControl(name="form.hq_session").value = '2011/12'
    69         self.browser.getControl(name="form.hq_disc").value = 'funny sport'
    7063
    7164        self.browser.getControl("Save").click()
     
    8477        self.assertEqual(student.alr_fname, 'Uli')
    8578        self.assertEqual(student.alr_no, '345')
    86         self.assertEqual(student.hq_type, 'nce')
    87         self.assertEqual(student.hq_fname, 'Beate')
    88         self.assertEqual(student.hq_matric_no, '444')
    89         self.assertEqual(student.hq_degree, 'upper_credit')
    90         self.assertEqual(student.hq_school, 'my school')
    91         self.assertEqual(student.hq_session, '2011/12')
    92         self.assertEqual(student.hq_disc, 'funny sport')
  • main/waeup.aaue/trunk/src/waeup/aaue/applicants/tests/test_browser.py

    r13544 r13545  
    9797        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    9898        self.assertTrue("Dispatch Address" in self.browser.contents)
     99
     100    def test_pg_application_manage(self):
     101        # Add pg applicants container
     102        self.pgcontainer = ApplicantsContainer()
     103        self.pgcontainer.mode = 'create'
     104        self.pgcontainer.code = u'pgft%s' % session_1
     105        self.pgcontainer.prefix = u'pgft'
     106        self.pgcontainer.application_category = u'no'
     107        self.pgcontainer.year = session_1
     108        self.pgcontainer.application_fee = 300.0
     109        self.pgcontainer.title = u'This is the pgft%s container' % session_1
     110        self.app['applicants'][self.pgcontainer.code] = self.pgcontainer
     111        delta = datetime.timedelta(days=10)
     112        self.pgcontainer.startdate = datetime.datetime.now(pytz.utc) - delta
     113        self.pgcontainer.enddate = datetime.datetime.now(pytz.utc) + delta
     114        # Add applicant
     115        pgapplicant = createObject(u'waeup.Applicant')
     116        pgapplicant.firstname = u'Anna'
     117        pgapplicant.lastname = u'Post'
     118        self.app['applicants'][self.pgcontainer.code].addApplicant(pgapplicant)
     119        self.pgapplication_number = pgapplicant.application_number
     120        self.pgapplicant = self.app['applicants'][self.pgcontainer.code][
     121            self.pgapplication_number]
     122        self.pgapplicant_path = ('http://localhost/app/applicants/pgft%s/%s'
     123            % (session_1, self.pgapplication_number))
     124        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
     125        self.browser.open(self.pgapplicant_path)
     126        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     127        self.assertTrue("3rd Higher Education Record" in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.