Merge remote-tracking branch 'origin/main' into feat/watch-summary
This commit is contained in:
commit
9dcd65b6c4
11 files changed
+108
-10
No files matched your search
@@ -109,3 +109,15 @@ async def test_update_me_changes_character_and_nickname_and_shows_on_comments(of
|
||||
assert (comments[0]["character"], comments[0]["color"], comments[0]["nickname"]) == ("bear", "blue", "곰돌이")
|
||||
assert comments[0]["mood"] == "thunder"
|
||||
assert "mood" not in (await c.patch("/v1/auth/me", headers=h, json={"mood": ""})).json()["me"]
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
async def test_logout_invalidates_access_and_refresh_tokens():
|
||||
async with client() as c:
|
||||
body = await _signup(c, login_id="mina_out")
|
||||
h = {"Authorization": f"Bearer {body['access_token']}"}
|
||||
assert (await c.post("/v1/auth/logout", headers=h)).json()["result"]["success"] is True
|
||||
assert (await c.get("/v1/auth/me", headers=h)).status_code == 401
|
||||
assert (await c.post("/v1/auth/refresh", json={"refresh_token": body["refresh_token"]})).json()["result"]["desc"] == "AUTH_TOKEN_INVALID"
|
||||
again = (await c.post("/v1/auth/login", json={"login_id": "mina_out", "password": "password1"})).json()
|
||||
assert (await c.get("/v1/auth/me", headers={"Authorization": f"Bearer {again['access_token']}"})).status_code == 200
|
||||
Reference in new issue
Block a user