fix: 코드 재검토 반영 — 댓글 더 보기, 긴 비밀번호 500 방지, 토큰 갱신 실패 처리, 연타 막기

This commit is contained in:
minaChoi committed 2026-10-06 10:38:27 +09:00
1 parent ae6b06ac1f
commit be8f827556
7 files changed
+88 -30

No files matched your search

+11
View File
@@ -31,6 +31,17 @@ async def test_signup_login_refresh_me():
assert (await c.post("/v1/auth/refresh", json={"refresh_token": ok["access_token"]})).json()["result"]["desc"] == "AUTH_TOKEN_INVALID"
@pytest.mark.anyio
async def test_password_over_72_bytes_is_rejected_not_500():
long_pw = "비밀번호" * 7 # 84바이트
async with client() as c:
r = await c.post("/v1/auth/signup", json={"login_id": "mina_long", "password": long_pw, "nickname": "긴비번"})
assert r.status_code == 200 and r.json()["result"]["desc"] == "INVALID_INPUT"
await _signup(c, login_id="mina_02")
r = await c.post("/v1/auth/login", json={"login_id": "mina_02", "password": long_pw})
assert r.status_code == 200 and r.json()["result"]["desc"] == "AUTH_FAILED"
@pytest.mark.anyio
async def test_signup_rejects_bad_input():
async with client() as c: