Example #1
0
 def test_incomplete_details(self):
     b = self._create_msg()
     f = b.select_form()
     f['zip5'] = '' #take off zip
     b.submit()
     self.assertTrue('Please try again after fixing the errors highlighted below')
     f = b.select_form(name='writerep')
     fill_user_details(f, to_congress=True)
     b.submit()
     self.assertEquals(b.path, '/writerep/')
     self.assertTrue('Your message has been sent to' in b.data)
Example #2
0
 def test_incomplete_details(self):
     b = self._create_msg()
     f = b.select_form()
     f['zip5'] = ''  #take off zip
     b.submit()
     self.assertTrue(
         'Please try again after fixing the errors highlighted below')
     f = b.select_form(name='writerep')
     fill_user_details(f, to_congress=True)
     b.submit()
     self.assertEquals(b.path, '/writerep/')
     self.assertTrue('Your message has been sent to' in b.data)
Example #3
0
 def _fill_wyr_form(self, f, subject, msg, captcha=False):
     fill_user_details(f, to_congress=True, captcha=captcha)
     f['ptitle'] = subject
     f['msg'] = msg
Example #4
0
 def _fill_wyr_form(self, f, subject, msg, captcha=False):
     fill_user_details(f, to_congress=True, captcha=captcha)
     f['ptitle'] = subject
     f['msg'] = msg