-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Store gh_ts in actor cookie, refs #67
- Loading branch information
Showing
2 changed files
with
12 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,6 @@ | |
import re | ||
|
||
|
||
|
||
@pytest.fixture | ||
def non_mocked_hosts(): | ||
return ["localhost"] | ||
|
@@ -144,17 +143,17 @@ async def test_github_auth_callback(ds, mocked_github_api): | |
"http://localhost/-/github-auth-callback?code=github-code-here", | ||
allow_redirects=False, | ||
) | ||
actor = ds.unsign(response.cookies["ds_actor"], "actor")["a"] | ||
assert { | ||
"a": { | ||
"display": "demouser", | ||
"gh_id": "123", | ||
"gh_name": "GitHub User", | ||
"gh_login": "demouser", | ||
"gh_email": "[email protected]", | ||
"gh_orgs": ["demouser-org"], | ||
"gh_teams": ["demouser-org/thetopteam"], | ||
} | ||
} == ds.unsign(response.cookies["ds_actor"], "actor") | ||
"display": "demouser", | ||
"gh_id": "123", | ||
"gh_name": "GitHub User", | ||
"gh_login": "demouser", | ||
"gh_email": "[email protected]", | ||
"gh_orgs": ["demouser-org"], | ||
"gh_teams": ["demouser-org/thetopteam"], | ||
}.items() <= actor.items() | ||
assert isinstance(actor["gh_ts"], int) | ||
assert "/" == response.headers["location"] | ||
|
||
|
||
|