Merge lp:~elopio/u1-test-utils/fix-already_logged_in into lp:u1-test-utils

Proposed by Leo Arias
Status: Merged
Approved by: Leo Arias
Approved revision: 24
Merged at revision: 23
Proposed branch: lp:~elopio/u1-test-utils/fix-already_logged_in
Merge into: lp:u1-test-utils
Diff against target: 28 lines (+14/-3)
1 file modified
u1testutils/sst/sso/helpers.py (+14/-3)
To merge this branch: bzr merge lp:~elopio/u1-test-utils/fix-already_logged_in
Reviewer Review Type Date Requested Status
Leo Arias (community) Approve
Review via email: mp+145510@code.launchpad.net

Commit message

Fixed the case when the user is already logged in.

To post a comment you must log in.
Revision history for this message
Leo Arias (elopio) wrote :

Tested with the pay acceptance tests.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'u1testutils/sst/sso/helpers.py'
--- u1testutils/sst/sso/helpers.py 2013-01-29 14:50:38 +0000
+++ u1testutils/sst/sso/helpers.py 2013-01-29 22:35:26 +0000
@@ -66,11 +66,22 @@
66 information will be send to it. Default is True.66 information will be send to it. Default is True.
6767
68 """68 """
69 log_in = pages.LogIn()
70 if is_site_recognized:69 if is_site_recognized:
71 log_in.log_in_to_site_recognized(user)70 if user is not None:
71 log_in = pages.LogIn()
72 log_in.log_in_to_site_recognized(user)
73 else:
74 # User is already signed in so SSO will just redirect back to the
75 # main site.
76 pass
72 else:77 else:
73 site_not_recognized = log_in.log_in_to_site_not_recognized(user)78 if user is not None:
79 log_in = pages.LogIn()
80 site_not_recognized = log_in.log_in_to_site_not_recognized(user)
81 else:
82 # User is already signed in so SSO will just show the site not
83 # recognized page.
84 site_not_recognized = pages.SiteNotRecognized()
74 site_not_recognized.make_all_information_available_to_website()85 site_not_recognized.make_all_information_available_to_website()
75 site_not_recognized.yes_sign_me_in()86 site_not_recognized.yes_sign_me_in()
7687

Subscribers

People subscribed via source and target branches

to all changes: