Ignore:
Timestamp:
22 Dec 2011, 07:05:32 (13 years ago)
Author:
Henrik Bettermann
Message:

Add test_certificate_removed.

Use phone widget also in ApplicantEditFormPage?.

Location:
main/waeup.sirp/trunk/src/waeup/sirp
Files:
3 edited

Legend:

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

    r7423 r7433  
    901901        )
    902902    form_fields['date_of_birth'].custom_widget = FriendlyDateWidget('le-year')
     903    form_fields['phone'].custom_widget = PhoneWidget
    903904    grok.template('applicanteditpage')
    904905    manage_applications = False
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_browser.py

    r7432 r7433  
    711711        return
    712712
     713    def test_certificate_removed(self):
     714        self.login()
     715        self.browser.open(self.edit_path)
     716        self.fill_correct_values()
     717        self.browser.getControl("Save").click()
     718        self.browser.open(self.view_path)
     719        self.assertTrue(
     720            'Unnamed Certificate' in self.browser.contents)
     721        self.browser.open(self.edit_path)
     722        self.assertTrue(
     723            '<option selected="selected" value="CERT1">' in self.browser.contents)
     724        # Now we remove the certificate
     725        del self.app['faculties']['fac1']['dep1'].certificates['CERT1']
     726        # The certificate is still shown in display mode
     727        self.browser.open(self.view_path)
     728        self.assertTrue(
     729            'Unnamed Certificate' in self.browser.contents)
     730        # The certificate is still selectable in edit mode so that it won't
     731        # be automatically replaced by another (arbitrary) certificate
     732        self.browser.open(self.edit_path)
     733        self.assertTrue(
     734            '<option selected="selected" value="CERT1">' in self.browser.contents)
     735        # Consequently, the certificate is still shown after saving the form
     736        self.browser.getControl("Save").click()
     737        self.browser.open(self.view_path)
     738        self.assertTrue(
     739            'Unnamed Certificate' in self.browser.contents)
     740
    713741class ApplicantRegisterTests(ApplicantsFullSetup):
    714742    # Tests for applicant registration
  • main/waeup.sirp/trunk/src/waeup/sirp/students/batching.py

    r7429 r7433  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """Batch processing components for academics objects.
     18"""Batch processing components for student objects.
    1919
    2020Batch processors eat CSV files to add, update or remove large numbers
Note: See TracChangeset for help on using the changeset viewer.