Exemplo n.º 1
0
 def test_validation_email_complete(self):
     # Test that the merge completes successfully when the user proves that
     # they're the owner of the second email address of the dupe account.
     browser, emails = self._assert_validation_email_confirm()
     ignore, ignore2, raw_msg2 = emails.pop()
     token_url = get_token_url_from_email(raw_msg2)
     browser.open(token_url)
     self.assertIn('trying to merge the Launchpad account',
                   browser.contents)
     browser.getControl('Confirm').click()
     self.assertIn('The accounts are being merged', browser.contents)
 def test_validation_email_complete(self):
     # Test that the merge completes successfully when the user proves that
     # he's the owner of the second email address of the dupe account.
     browser, emails = self._assert_validation_email_confirm()
     ignore, ignore2, raw_msg2 = emails.pop()
     token_url = get_token_url_from_email(raw_msg2)
     browser.open(token_url)
     self.assertIn(
         'trying to merge the Launchpad account', browser.contents)
     browser.getControl('Confirm').click()
     self.assertIn(
         'The accounts are being merged', browser.contents)
Exemplo n.º 3
0
 def _assert_validation_email_confirm(self):
     # Test that the user can go to the page we sent a link via email to
     # validate the first claimed email address.
     browser = self._assert_perform_merge_request()
     emails = [stub.test_emails.pop(), stub.test_emails.pop()]
     emails.sort()
     ignore, ignore2, raw_msg1 = emails.pop()
     token_url = get_token_url_from_email(raw_msg1)
     browser.open(token_url)
     self.assertIn('trying to merge the Launchpad account',
                   browser.contents)
     browser.getControl('Confirm').click()
     # User confirms the merge request submitting the form, but the merge
     # wasn't finished because the duplicate account still have a registered
     # email addresses.
     self.assertIn('has other registered email addresses too',
                   browser.contents)
     return browser, emails
 def _assert_validation_email_confirm(self):
     # Test that the user can go to the page we sent a link via email to
     # validate the first claimed email address.
     browser = self._assert_perform_merge_request()
     emails = [stub.test_emails.pop(), stub.test_emails.pop()]
     emails.sort()
     ignore, ignore2, raw_msg1 = emails.pop()
     token_url = get_token_url_from_email(raw_msg1)
     browser.open(token_url)
     self.assertIn(
         'trying to merge the Launchpad account', browser.contents)
     browser.getControl('Confirm').click()
     # User confirms the merge request submitting the form, but the merge
     # wasn't finished because the duplicate account still have a registered
     # email addresses.
     self.assertIn(
         'has other registered e-mail addresses too', browser.contents)
     return browser, emails