Merge lp:~elopio/u1-test-utils/sso_improvements into lp:u1-test-utils

Proposed by Leo Arias
Status: Merged
Approved by: Natalia Bidart
Approved revision: 19
Merged at revision: 18
Proposed branch: lp:~elopio/u1-test-utils/sso_improvements
Merge into: lp:u1-test-utils
Diff against target: 20 lines (+5/-6)
1 file modified
u1testutils/sst/sso/utils/mail.py (+5/-6)
To merge this branch: bzr merge lp:~elopio/u1-test-utils/sso_improvements
Reviewer Review Type Date Requested Status
Natalia Bidart (community) Approve
Review via email: mp+143778@code.launchpad.net

Commit message

Copied nessita's mail change from SSO.

Description of the change

Copied nessita's mail change from SSO.

To post a comment you must log in.
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Sounds about right!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'u1testutils/sst/sso/utils/mail.py'
--- u1testutils/sst/sso/utils/mail.py 2013-01-16 15:16:50 +0000
+++ u1testutils/sst/sso/utils/mail.py 2013-01-17 21:36:26 +0000
@@ -42,13 +42,12 @@
42 vcode = match.group(1).strip()42 vcode = match.group(1).strip()
43 else:43 else:
44 raise AssertionError("No verification code found in email.")44 raise AssertionError("No verification code found in email.")
45 match = re.search(45 links = map(str.strip, re.findall('^(http.*)$', body, re.MULTILINE))
46 'confirm your (?:account|email address|reset):(.*)If',46 if links:
47 body, re.S)47 link = links[0]
48 if match:
49 link = match.group(1).strip()
50 else:48 else:
51 raise AssertionError("No verification link found in email.")49 msg = "No verification link found in email. Email is:\n%r."
50 raise AssertionError(msg % body)
52 return vcode, link51 return vcode, link
5352
5453

Subscribers

People subscribed via source and target branches

to all changes: