Ignore:
Timestamp:
6 Oct 2015, 04:25:35 (9 years ago)
Author:
Henrik Bettermann
Message:

Ignore trailing whitespaces when comparing lastname.

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

Legend:

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

    r13280 r13282  
    13341334            if results:
    13351335                applicant = results[0]
    1336                 if applicant.lastname.lower() != lastname.lower():
     1336                if applicant.lastname.lower().strip() != lastname.lower():
    13371337                    # Don't tell the truth here. Anonymous must not
    13381338                    # know that a record was found and only the lastname
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py

    r13280 r13282  
    13861386
    13871387    def test_check_status(self):
    1388         self.applicant.lastname = u'Lion'
     1388        self.applicant.lastname = u'Lion '
    13891389        self.browser.open('http://localhost/app/applicants/checkstatus')
    13901390        self.browser.getControl(name="applicant_id").value = 'nonsense'
     
    14041404        self.browser.open('http://localhost/app/applicants/checkstatus')
    14051405        self.browser.getControl(name="applicant_id").value = self.applicant.applicant_id
     1406        # whitespaces are ignored
    14061407        self.browser.getControl(name="lastname").value = 'Lion'
    14071408        self.browser.getControl("Submit").click()
Note: See TracChangeset for help on using the changeset viewer.