-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix login service * Fix hypha main version
- Loading branch information
Showing
12 changed files
with
76 additions
and
42 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"version": "0.20.20" | ||
"version": "0.20.20.post1" | ||
} |
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
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 |
---|---|---|
|
@@ -103,6 +103,32 @@ def add2(a: int, b: int) -> int: | |
assert svc_info2["service_schema"] | ||
|
||
|
||
async def test_login_service(fastapi_server): | ||
"""Test login to the server.""" | ||
async with connect_to_server( | ||
{"name": "test client", "server_url": SERVER_URL} | ||
) as api: | ||
svc = await api.get_service("public/hypha-login") | ||
assert svc and callable(svc.start) | ||
info = await svc.start() | ||
key = info["key"] | ||
data = await svc.check(key, timeout=-1) | ||
assert data is None | ||
await svc.report(key, "test") | ||
token = await svc.check(key, timeout=1) | ||
assert token == "test" | ||
|
||
# with user info | ||
info = await svc.start() | ||
key = info["key"] | ||
data = await svc.check(key, timeout=-1) | ||
assert data is None | ||
await svc.report(key, "test", email="[email protected]") | ||
user_profile = await svc.check(key, timeout=1, profile=True) | ||
assert user_profile["token"] == "test" | ||
assert user_profile["email"] == "[email protected]" | ||
|
||
|
||
async def test_login(fastapi_server): | ||
"""Test login to the server.""" | ||
async with connect_to_server( | ||
|