-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
robnagler
committed
Aug 7, 2023
1 parent
3eb443d
commit e6c4cdb
Showing
10 changed files
with
72 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ def test_different_email(auth_fc): | |
}, | ||
) | ||
t = fc.sr_auth_state(userName="[email protected]", displayName="abc") | ||
fc.sr_get("authLogout", {"simulation_type": fc.sr_sim_type}) | ||
fc.sr_logout() | ||
uid = fc.sr_auth_state(userName=None, isLoggedIn=False).uid | ||
r = fc.sr_post( | ||
"authEmailLogin", {"email": "[email protected]", "simulationType": fc.sr_sim_type} | ||
|
@@ -60,7 +60,7 @@ def test_follow_email_auth_link_twice(auth_fc): | |
d = fc.sr_get(r.uri) | ||
assert not re.search(r"login-fail", pkcompat.from_bytes(d.data)) | ||
fc.sr_email_confirm(r) | ||
fc.sr_get("authLogout", {"simulation_type": fc.sr_sim_type}) | ||
fc.sr_logout() | ||
# now logged out, should see login fail for bad link | ||
pkre("login-fail", pkcompat.from_bytes(fc.get(r.uri).data)) | ||
|
||
|
@@ -79,7 +79,7 @@ def test_force_login(auth_fc): | |
"authEmailLogin", {"email": "[email protected]", "simulationType": fc.sr_sim_type} | ||
) | ||
fc.get(r.uri) | ||
fc.sr_get("authLogout", {"simulation_type": fc.sr_sim_type}) | ||
fc.sr_logout() | ||
with pkexcept("SRException.*routeName.*login"): | ||
fc.sr_post("listSimulations", {"simulationType": fc.sr_sim_type}) | ||
r = fc.sr_post( | ||
|
@@ -121,7 +121,7 @@ def test_guest_merge(auth_fc): | |
folder="/", | ||
), | ||
) | ||
guest_uid = fc.sr_auth_state().uid | ||
guest_uid = fc.sr_uid | ||
|
||
# Convert to email user | ||
r = fc.sr_post( | ||
|
@@ -149,7 +149,7 @@ def test_guest_merge(auth_fc): | |
folder="/", | ||
), | ||
) | ||
fc.sr_get("authLogout", {"simulation_type": fc.sr_sim_type}) | ||
fc.sr_logout() | ||
|
||
# Login as email user | ||
r = fc.sr_post( | ||
|
@@ -191,7 +191,7 @@ def test_happy_path(auth_fc): | |
isLoggedIn=True, | ||
userName="[email protected]", | ||
).uid | ||
r = fc.sr_get("authLogout", {"simulation_type": fc.sr_sim_type}) | ||
r = fc.sr_logout() | ||
fc.sr_auth_state( | ||
displayName=None, | ||
isLoggedIn=False, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ def test_token_reuse(auth_fc): | |
) | ||
fc.sr_email_confirm(r) | ||
s = fc.sr_auth_state(userName="[email protected]") | ||
fc.sr_get("authLogout", {"simulation_type": fc.sr_sim_type}) | ||
fc.sr_logout() | ||
r = fc.sr_get(r.uri, redirect=False) | ||
pkre("/login-fail/email", r.header_get("Location")) | ||
fc.sr_auth_state(isLoggedIn=False) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,7 +68,7 @@ def _status_eq(next_req, status): | |
user_premium = "[email protected]" | ||
fc.sr_email_login(user_free) | ||
fc.sr_email_login(user_premium) | ||
_make_user_premium(fc.sr_auth_state().uid) | ||
_make_user_premium(fc.sr_uid) | ||
_make_invalid_job() | ||
next_req_premium = _run_sim(fc.sr_sim_data()) | ||
fc.sr_email_login(user_free) | ||
|