Ignore:
Timestamp:
21 Dec 2011, 12:08:05 (13 years ago)
Author:
uli
Message:

Cosmetics.

File:
1 edited

Legend:

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

    r7424 r7426  
    7979        # Add an applicants container
    8080        applicantscontainer = ApplicantsContainer()
    81         #applicantscontainer.ac_prefix = 'APP'
    8281        applicantscontainer.code = u'app2009'
    8382        applicantscontainer.prefix = 'app'
     
    140139        # applicant object created.
    141140        self.browser.open(self.login_path)
    142         self.browser.getControl(name="form.login").value = self.applicant.applicant_id
     141        self.browser.getControl(
     142            name="form.login").value = self.applicant.applicant_id
    143143        self.browser.getControl(name="form.password").value = 'apwd'
    144144        self.browser.getControl("Login").click()
     
    170170        self.assertFalse(
    171171            'Manage' in self.browser.contents)
    172 
    173    
     172        return
     173
    174174    def test_anonymous_no_actions(self):
    175175        # Make sure anonymous users cannot access actions
     
    198198        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    199199        self.assertEqual(self.browser.url, self.manage_root_path)
     200        return
    200201
    201202    def test_manage_actions_access(self):
     
    245246        self.browser.getControl(name="form.provider").value = [
    246247            'waeup.sirp.applicants.ApplicantsContainer']
    247         #self.browser.getControl(name="form.ac_prefix").value = ['APP']
    248         self.browser.getControl(name="form.application_category").value = ['basic']
     248        self.browser.getControl(
     249            name="form.application_category").value = ['basic']
    249250        self.browser.getControl("Add applicants container").click()
    250251        self.assertTrue('Added:' in self.browser.contents)
     
    257258        self.browser.getControl(name="form.provider").value = [
    258259            'waeup.sirp.applicants.ApplicantsContainer']
    259         #self.browser.getControl(name="form.ac_prefix").value = ['APP']
    260         self.browser.getControl(name="form.application_category").value = ['basic']
     260        self.browser.getControl(
     261            name="form.application_category").value = ['basic']
    261262        self.browser.getControl("Add applicants container").click()
    262         self.assertTrue('exists already in the database' in self.browser.contents)
     263        self.assertTrue('exists already in the database'
     264                        in self.browser.contents)
    263265        self.browser.open(self.manage_root_path)
    264266        ctrl = self.browser.getControl(name='val_id')
     
    272274            'waeup.sirp.applicants.ApplicantsContainer']
    273275        #self.browser.getControl(name="form.ac_prefix").value = ['APP']
    274         self.browser.getControl(name="form.application_category").value = ['basic']
     276        self.browser.getControl(
     277            name="form.application_category").value = ['basic']
    275278        self.browser.getControl("Add applicants container").click()
    276279        del self.app['applicants']['app2010']
     
    322325        self.browser.getControl("Save").click()
    323326        self.assertMatches('...Form has been saved...', self.browser.contents)
    324         self.assertMatches('...Application started by Manager...', self.browser.contents)
     327        self.assertMatches('...Application started by Manager...',
     328                           self.browser.contents)
    325329        self.browser.open(self.view_path)
    326330        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     
    334338        self.browser.getControl(name="control_password").value = 'secre'
    335339        self.browser.getControl("Save").click()
    336         self.assertMatches('...Passwords do not match...', self.browser.contents)
     340        self.assertMatches('...Passwords do not match...',
     341                           self.browser.contents)
    337342        self.browser.getControl(name="password").value = 'secret'
    338343        self.browser.getControl(name="control_password").value = 'secret'
     
    342347        self.browser.open(self.slip_path)
    343348        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    344         self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
     349        self.assertEqual(self.browser.headers['Content-Type'],
     350                         'application/pdf')
    345351        # Managers can view applicants even if certificate has been removed
    346352        del self.app['faculties']['fac1']['dep1'].certificates['CERT1']
     
    601607        self.fill_correct_values()
    602608        self.browser.getControl("Add online payment ticket").click()
    603         self.assertMatches('...Payment ticket created...', self.browser.contents)
    604         # Payment ticket can be removed if they haven't received a valid callback
     609        self.assertMatches('...Payment ticket created...',
     610                           self.browser.contents)
     611        # Payment ticket can be removed if they haven't received a
     612        # valid callback
    605613        ctrl = self.browser.getControl(name='val_id')
    606614        value = ctrl.options[0]
     
    634642        self.browser.getLink("Download payment receipt").click()
    635643        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    636         self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
     644        self.assertEqual(self.browser.headers['Content-Type'],
     645                         'application/pdf')
    637646        # Applicant is is in state 'paid'
    638647        self.browser.open(self.view_path)
     
    665674        # since the passport confirmation box was not ticked
    666675        self.assertTrue(
    667             'Passport picture confirmation box not ticked' in self.browser.contents)
     676            'Passport picture confirmation box not ticked'
     677            in self.browser.contents)
    668678        self.browser.getControl(name="confirm_passport").value = True
    669679        self.browser.getControl("Final Submit").click()
     
    675685            'The requested form is locked' in self.browser.contents)
    676686        self.browser.goBack(count=1)
    677         #import pdb; pdb.set_trace()
    678687        self.browser.getControl("Final Submit").click()
    679688        self.assertTrue(
     
    696705        self.browser.open(self.edit_path)
    697706        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    698         #print self.browser.contents
    699707        self.assertTrue(
    700708            'The requested form is locked' in self.browser.contents)
     
    720728        self.assertEqual(self.browser.url,
    721729            self.container_path + '/registration_complete?email=xx%40yy.zz')
     730        return
    722731
    723732    def test_register_applicant_wo_phone(self):
     
    732741        self.assertEqual(self.browser.url,
    733742            self.container_path + '/registration_complete?email=xx%40yy.zz')
    734 
     743        return
Note: See TracChangeset for help on using the changeset viewer.