Remove keys from session and inject Session class into Jinja (#1456)

* Closes #1362
* Reduces the session object to just an id, nonce, and security hash
This commit is contained in:
Kevin Chung
2020-06-03 02:09:48 -04:00
committed by GitHub
parent 2a8d7ed349
commit 52c65ced55
7 changed files with 27 additions and 22 deletions

View File

@@ -144,9 +144,8 @@ def register_user(
if raise_for_error:
with client.session_transaction() as sess:
assert sess["id"]
assert sess["name"] == name
assert sess["email"]
assert sess["nonce"]
assert sess["hash"]
def register_team(app, name="team", password="password", raise_for_error=True):
@@ -171,9 +170,8 @@ def login_as_user(app, name="user", password="password", raise_for_error=True):
if raise_for_error:
with client.session_transaction() as sess:
assert sess["id"]
assert sess["name"]
assert sess["email"]
assert sess["nonce"]
assert sess["hash"]
return client
@@ -229,9 +227,8 @@ def login_with_mlc(
if raise_for_error:
with client.session_transaction() as sess:
assert sess["id"]
assert sess["name"]
assert sess["email"]
assert sess["nonce"]
assert sess["hash"]
return client