Merge branch 'main' of https://gitea.o2o.kr/Web4ai/o2o-site-AEO
This commit is contained in:
commit
ed0137c9da
31 files changed
+2262
-9
No files matched your search
@@ -0,0 +1,248 @@
|
||||
"""사장님 에이전트 런타임.
|
||||
|
||||
여기서 지키는 것 셋 — 나머지 검사는 전부 이 셋을 지탱한다.
|
||||
1. 도구는 서비스 계층을 통과한다(게이트가 살아 있다)
|
||||
2. 등급은 레지스트리가 정한다 — 모델이 확인 절차를 건너뛸 수 없다
|
||||
3. 모호하면 실행하지 않고 되묻는다
|
||||
"""
|
||||
|
||||
import uuid
|
||||
from types import SimpleNamespace
|
||||
from unittest.mock import AsyncMock
|
||||
|
||||
import pytest
|
||||
from sqlalchemy import text
|
||||
|
||||
from common.enums import PlaceCategory
|
||||
from services.agent import runtime, tools
|
||||
from services.agent.tools import ToolGrade
|
||||
from services.llm.errors import LlmError
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def choose(monkeypatch):
|
||||
"""LLM 을 대신한다 — 테스트는 절대 실제 모델을 부르지 않는다."""
|
||||
|
||||
def _set(payload):
|
||||
monkeypatch.setattr(runtime, "_choose", AsyncMock(return_value=payload))
|
||||
|
||||
monkeypatch.setenv("AGENT_CHAT_ENABLED", "1")
|
||||
monkeypatch.setattr(runtime, "is_configured", lambda: True)
|
||||
return _set
|
||||
|
||||
|
||||
async def seed(client, auth_headers, name="대화숙소"):
|
||||
h = await auth_headers(f"agent-{uuid.uuid4().hex[:8]}")
|
||||
res = await client.post("/v1/place", headers=h, json={"name": name, "category": 1})
|
||||
return h, res.json()["place"]["place_id"]
|
||||
|
||||
|
||||
async def user_of(client, headers, place_id):
|
||||
"""라우터를 거치지 않고 런타임을 직접 부르기 위한 UserInfo."""
|
||||
me = (await client.get("/v1/place", headers=headers)).json()
|
||||
del me
|
||||
from router.v1.validator.dependencies import decode_access_token
|
||||
|
||||
token = headers["Authorization"].split(" ", 1)[1]
|
||||
return decode_access_token(token)
|
||||
|
||||
|
||||
# ── 1. 게이트가 살아 있다 ────────────────────────────────────────────────
|
||||
|
||||
def test_모든_도구는_서비스_계층을_통과한다():
|
||||
"""★ 도구가 crud 를 직접 부르면 스키마 검증·출처·정정본 보호가 조용히 사라진다.
|
||||
|
||||
소스에 `_crud.` 직접 호출이 없는지 본다 — 주석이 아니라 코드로 못 박는 자리다."""
|
||||
import inspect
|
||||
|
||||
source = inspect.getsource(tools)
|
||||
body = source[source.index("# ── 읽기"):source.index("class ToolRejected")]
|
||||
assert "fact_crud." not in body
|
||||
assert "place_crud." not in body
|
||||
assert "DB_SESSION_MNG" not in body
|
||||
|
||||
|
||||
def test_없는_항목은_스키마가_막는다(db_engine):
|
||||
schema_keys = {f["key"] for f in tools.fields_of(SimpleNamespace(category=PlaceCategory.LODGING.value))}
|
||||
assert "check_in_time" in schema_keys
|
||||
assert "고르곤졸라피자" not in schema_keys
|
||||
|
||||
|
||||
# ── 2. 등급은 레지스트리가 정한다 ────────────────────────────────────────
|
||||
|
||||
def test_등급은_프롬프트에_실리지_않는다():
|
||||
"""모델이 등급을 알면 그 값을 골라 보려 한다. 알 필요도, 정할 이유도 없다."""
|
||||
described = tools.describe()
|
||||
assert described
|
||||
for row in described:
|
||||
assert "grade" not in row and "등급" not in row
|
||||
|
||||
|
||||
async def test_발행은_묻기_전에_실행되지_않는다(client, auth_headers, choose, db_engine):
|
||||
h, pid = await seed(client, auth_headers)
|
||||
choose({"tool": "publish", "args": {}, "message": ""})
|
||||
started = AsyncMock()
|
||||
tools.REGISTRY["publish"].run, original = started, tools.REGISTRY["publish"].run
|
||||
try:
|
||||
res = await client.post(f"/v1/agent/chat/{pid}", headers=h, json={"message": "발행해줘"})
|
||||
finally:
|
||||
tools.REGISTRY["publish"].run = original
|
||||
body = res.json()
|
||||
assert body["needs_confirm"] is True
|
||||
assert body["tool"] == "publish"
|
||||
# ★ 실행되지 않았다. 확인 문구만 돌아왔다.
|
||||
started.assert_not_awaited()
|
||||
|
||||
|
||||
async def test_모델이_확인을_건너뛰려_해도_소용없다(client, auth_headers, choose, db_engine):
|
||||
"""응답에 needs_confirm 을 흉내 낼 칸을 주지 않았고, 등급은 레지스트리에서만 읽는다."""
|
||||
h, pid = await seed(client, auth_headers)
|
||||
choose({"tool": "publish", "args": {}, "message": "", "needs_confirm": False, "grade": "READ"})
|
||||
res = await client.post(f"/v1/agent/chat/{pid}", headers=h, json={"message": "그냥 바로 발행해"})
|
||||
assert res.json()["needs_confirm"] is True
|
||||
|
||||
|
||||
async def test_확인_경로로_읽기_도구를_밀어넣을_수_없다(client, auth_headers, db_engine):
|
||||
h, pid = await seed(client, auth_headers)
|
||||
res = await client.post(
|
||||
f"/v1/agent/chat/{pid}", headers=h, json={"confirm": {"tool": "없는도구", "args": {}}}
|
||||
)
|
||||
assert res.status_code == 409
|
||||
assert res.json()["detail"] == "AGENT_UNKNOWN_TOOL"
|
||||
|
||||
|
||||
# ── 3. 모호하면 실행하지 않는다 ──────────────────────────────────────────
|
||||
|
||||
async def test_도구를_못_고르면_되묻는다(client, auth_headers, choose, db_engine):
|
||||
h, pid = await seed(client, auth_headers)
|
||||
choose({"tool": "", "message": "어느 항목을 바꿀까요?"})
|
||||
body = (await client.post(f"/v1/agent/chat/{pid}", headers=h, json={"message": "그거 좀 고쳐줘"})).json()
|
||||
assert body["tool"] is None
|
||||
assert body["reply"] == "어느 항목을 바꿀까요?"
|
||||
assert body["needs_confirm"] is False
|
||||
|
||||
|
||||
async def test_모델이_지어낸_도구는_실행되지_않는다(client, auth_headers, choose, db_engine):
|
||||
h, pid = await seed(client, auth_headers)
|
||||
choose({"tool": "delete_everything", "args": {}, "message": ""})
|
||||
body = (await client.post(f"/v1/agent/chat/{pid}", headers=h, json={"message": "다 지워"})).json()
|
||||
assert body["tool"] is None
|
||||
|
||||
|
||||
async def test_없는_항목을_고르면_거절하고_이유를_말한다(client, auth_headers, choose, db_engine):
|
||||
h, pid = await seed(client, auth_headers)
|
||||
choose({"tool": "set_fact", "args": {"key": "메뉴명", "value": "고르곤졸라"}, "message": ""})
|
||||
body = (await client.post(f"/v1/agent/chat/{pid}", headers=h, json={"message": "메뉴명 바꿔줘"})).json()
|
||||
assert body.get("rejected") is True
|
||||
assert "고칠 수 없" in body["reply"]
|
||||
|
||||
|
||||
# ── 소유자 범위 ──────────────────────────────────────────────────────────
|
||||
|
||||
async def test_남의_가게는_없는_것과_똑같이_답한다(client, auth_headers, choose, db_engine):
|
||||
"""★ 대화창이 소유자 스코프를 우회하는 유일한 입구가 되면 안 된다."""
|
||||
_mine, pid = await seed(client, auth_headers, "내가게")
|
||||
other = await auth_headers("agent-outsider")
|
||||
choose({"tool": "list_facts", "args": {}, "message": ""})
|
||||
res = await client.post(f"/v1/agent/chat/{pid}", headers=other, json={"message": "정보 보여줘"})
|
||||
assert res.status_code == 404
|
||||
assert res.json()["detail"] == "PLACE_NOT_FOUND"
|
||||
|
||||
|
||||
async def test_로그인_없이는_열리지_않는다(client):
|
||||
res = await client.post(f"/v1/agent/chat/{uuid.uuid4()}", json={"message": "안녕"})
|
||||
assert res.status_code in (401, 403)
|
||||
|
||||
|
||||
# ── 실행 결과 문구 ───────────────────────────────────────────────────────
|
||||
|
||||
async def test_값을_바꾸면_재발행이_필요하다고_말한다(client, auth_headers, choose, db_engine):
|
||||
"""★ 이 한 줄이 빠지면 사장님은 반영된 줄 알고 확인하러 갔다가 옛 값을 본다."""
|
||||
h, pid = await seed(client, auth_headers)
|
||||
choose({"tool": "set_fact", "args": {"key": "check_in_time", "value": "15:00"}, "message": ""})
|
||||
body = (await client.post(f"/v1/agent/chat/{pid}", headers=h, json={"message": "체크인 3시로"})).json()
|
||||
assert body.get("rejected") is not True, body["reply"]
|
||||
assert "체크인 시간" in body["reply"]
|
||||
assert "발행" in body["reply"]
|
||||
|
||||
async with db_engine.begin() as c:
|
||||
stored = (
|
||||
await c.execute(
|
||||
text("SELECT value FROM place_facts WHERE place_id=:p AND key='check_in_time' AND deleted=false"),
|
||||
{"p": uuid.UUID(pid)},
|
||||
)
|
||||
).scalars().all()
|
||||
assert "15:00" in stored
|
||||
|
||||
|
||||
async def test_결과_문구는_모델이_쓰지_않는다(client, auth_headers, choose, db_engine):
|
||||
"""모델이 결과를 쓰면 하지 않은 일을 했다고 말할 수 있다."""
|
||||
h, pid = await seed(client, auth_headers)
|
||||
choose({
|
||||
"tool": "set_fact",
|
||||
"args": {"key": "check_in_time", "value": "15:00"},
|
||||
"message": "사이트까지 전부 반영을 끝냈습니다!",
|
||||
})
|
||||
body = (await client.post(f"/v1/agent/chat/{pid}", headers=h, json={"message": "체크인 3시로"})).json()
|
||||
assert "전부 반영을 끝냈습니다" not in body["reply"]
|
||||
|
||||
|
||||
# ── 실패 처리 ────────────────────────────────────────────────────────────
|
||||
|
||||
async def test_LLM_실패는_502_로_나가고_원문을_흘리지_않는다(client, auth_headers, monkeypatch, db_engine):
|
||||
h, pid = await seed(client, auth_headers)
|
||||
monkeypatch.setattr(runtime, "is_configured", lambda: True)
|
||||
monkeypatch.setattr(runtime, "_choose", AsyncMock(side_effect=LlmError("키가 sk-1234 라서 실패")))
|
||||
res = await client.post(f"/v1/agent/chat/{pid}", headers=h, json={"message": "안녕"})
|
||||
assert res.status_code == 502
|
||||
assert res.json()["detail"] == "AGENT_CALL_FAILED"
|
||||
assert "sk-1234" not in res.text
|
||||
|
||||
|
||||
async def test_키가_없으면_대화창을_열지_않는다(client, auth_headers, monkeypatch, db_engine):
|
||||
h, pid = await seed(client, auth_headers)
|
||||
monkeypatch.setattr(runtime, "is_configured", lambda: False)
|
||||
res = await client.post(f"/v1/agent/chat/{pid}", headers=h, json={"message": "안녕"})
|
||||
assert res.status_code == 409
|
||||
assert res.json()["detail"] == "AGENT_NOT_CONFIGURED"
|
||||
assert (await client.get("/v1/agent/status", headers=h)).json()["enabled"] is False
|
||||
|
||||
|
||||
async def test_너무_긴_발화는_모델을_부르기_전에_끊는다(client, auth_headers, monkeypatch, db_engine):
|
||||
h, pid = await seed(client, auth_headers)
|
||||
called = AsyncMock()
|
||||
monkeypatch.setattr(runtime, "_choose", called)
|
||||
res = await client.post(f"/v1/agent/chat/{pid}", headers=h, json={"message": "가" * (runtime.MAX_MESSAGE + 1)})
|
||||
assert res.status_code == 422 # pydantic 이 먼저 막는다
|
||||
called.assert_not_awaited()
|
||||
|
||||
|
||||
def test_읽기_도구는_확인을_요구하지_않는다():
|
||||
for name in ("get_site_status", "list_facts"):
|
||||
assert tools.REGISTRY[name].grade == ToolGrade.READ
|
||||
assert tools.REGISTRY["set_fact"].grade == ToolGrade.REVERSIBLE
|
||||
assert tools.REGISTRY["publish"].grade == ToolGrade.SEMI
|
||||
assert tools.REGISTRY["publish"].confirm
|
||||
|
||||
|
||||
# ── 보류 스위치 ─────────────────────────────────────────────────────────
|
||||
|
||||
def test_스위치가_꺼져_있으면_키가_있어도_안_열린다(monkeypatch):
|
||||
"""★ 기본이 꺼짐이다. 카카오톡 채널이 준비되기 전에는 대화창을 띄우지 않는다 —
|
||||
코드는 다 있지만 사장님에게는 어디에도 닿지 않는 입구다."""
|
||||
monkeypatch.setattr(runtime.provider, "active", lambda: SimpleNamespace(is_configured=lambda: True))
|
||||
monkeypatch.delenv("AGENT_CHAT_ENABLED", raising=False)
|
||||
assert runtime.is_configured() is False
|
||||
monkeypatch.setenv("AGENT_CHAT_ENABLED", "1")
|
||||
assert runtime.is_configured() is True
|
||||
monkeypatch.setenv("AGENT_CHAT_ENABLED", "0")
|
||||
assert runtime.is_configured() is False
|
||||
|
||||
|
||||
async def test_꺼진_동안_대화_요청은_거절된다(client, auth_headers, monkeypatch, db_engine):
|
||||
monkeypatch.delenv("AGENT_CHAT_ENABLED", raising=False)
|
||||
h, pid = await seed(client, auth_headers)
|
||||
res = await client.post(f"/v1/agent/chat/{pid}", headers=h, json={"message": "안녕"})
|
||||
assert res.status_code == 409
|
||||
assert res.json()["detail"] == "AGENT_NOT_CONFIGURED"
|
||||
assert (await client.get("/v1/agent/status", headers=h)).json()["enabled"] is False
|
||||
@@ -0,0 +1,185 @@
|
||||
"""카카오톡 채널 신원 연결.
|
||||
|
||||
여기서 지키는 것은 하나다 — **연결되지 않은 발화자는 어떤 사장님도 되지 못한다.**
|
||||
나머지 검사(코드 일회성·만료·시도 제한·재발급)는 전부 그 한 줄을 지탱한다.
|
||||
"""
|
||||
|
||||
import uuid
|
||||
from datetime import datetime, timedelta, timezone
|
||||
|
||||
import pytest
|
||||
from sqlalchemy import text
|
||||
|
||||
from services import kakao_link_service as service
|
||||
from services.kakao_link_service import KakaoLinkError
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def channel(monkeypatch):
|
||||
"""KAKAO_CHANNEL_PUBLIC_ID 가 있어야 기능이 열린다. 없는 경우는 따로 검사한다."""
|
||||
monkeypatch.setenv("KAKAO_CHANNEL_PUBLIC_ID", "_testCh")
|
||||
monkeypatch.setenv("KAKAO_LINK_CODE_TTL_MIN", "10")
|
||||
monkeypatch.setenv("KAKAO_LINK_MAX_ATTEMPTS", "3")
|
||||
|
||||
|
||||
async def test_채널_설정이_없으면_기능_자체가_꺼진다(db_engine, monkeypatch):
|
||||
monkeypatch.setenv("KAKAO_CHANNEL_PUBLIC_ID", "")
|
||||
assert service.enabled() is False
|
||||
with pytest.raises(KakaoLinkError, match="KAKAO_LINK_DISABLED"):
|
||||
await service.issue_code(uuid.uuid4())
|
||||
# 화면은 자리를 그리되 버튼을 죽인다 — 상태 조회 자체는 살아 있어야 한다.
|
||||
assert (await service.state(uuid.uuid4()))["connection_enabled"] is False
|
||||
|
||||
|
||||
async def test_코드는_한_번만_먹는다(db_engine):
|
||||
user_id, key = uuid.uuid4(), "kakao-key-1"
|
||||
code = (await service.issue_code(user_id))["code"]
|
||||
|
||||
assert await service.redeem(code, key) == user_id
|
||||
# ★ 두 번째는 실패해야 한다. 같은 코드로 다른 카톡 계정이 붙으면 연결의 의미가 없다.
|
||||
with pytest.raises(KakaoLinkError, match="KAKAO_LINK_CODE_INVALID"):
|
||||
await service.redeem(code, "kakao-key-2")
|
||||
|
||||
|
||||
async def test_연결된_발화자만_사장님이_된다(db_engine):
|
||||
user_id, key = uuid.uuid4(), "kakao-key-3"
|
||||
# ★ 이게 이 기능의 전부다 — 연결 전에는 어떤 값도 돌려주지 않는다.
|
||||
assert await service.resolve(key) is None
|
||||
await service.redeem((await service.issue_code(user_id))["code"], key)
|
||||
assert await service.resolve(key) == user_id
|
||||
assert await service.resolve("모르는-키") is None
|
||||
|
||||
|
||||
async def test_만료된_코드는_안_먹는다(db_engine):
|
||||
user_id = uuid.uuid4()
|
||||
code = (await service.issue_code(user_id))["code"]
|
||||
async with db_engine.begin() as c:
|
||||
await c.execute(
|
||||
text("UPDATE owner_kakao_links SET code_expires_at = now() - interval '1 minute' WHERE user_id=:u"),
|
||||
{"u": user_id},
|
||||
)
|
||||
with pytest.raises(KakaoLinkError, match="KAKAO_LINK_CODE_INVALID"):
|
||||
await service.redeem(code, "kakao-key-4")
|
||||
|
||||
|
||||
async def test_오입력_시도는_상한에서_끊긴다(db_engine):
|
||||
"""짧은 코드(6자리)라 무차별 대입이 가능하다. 시도 수가 유일한 방어다."""
|
||||
user_id = uuid.uuid4()
|
||||
code = (await service.issue_code(user_id))["code"]
|
||||
async with db_engine.begin() as c:
|
||||
await c.execute(
|
||||
text("UPDATE owner_kakao_links SET code_attempts = 3 WHERE user_id=:u"), {"u": user_id}
|
||||
)
|
||||
with pytest.raises(KakaoLinkError, match="KAKAO_LINK_CODE_INVALID"):
|
||||
await service.redeem(code, "kakao-key-5")
|
||||
|
||||
|
||||
async def test_재발급은_행을_늘리지_않고_옛_코드를_죽인다(db_engine):
|
||||
user_id = uuid.uuid4()
|
||||
first = (await service.issue_code(user_id))["code"]
|
||||
second = (await service.issue_code(user_id))["code"]
|
||||
assert first != second
|
||||
|
||||
async with db_engine.begin() as c:
|
||||
rows = (
|
||||
await c.execute(
|
||||
text("SELECT count(*) FROM owner_kakao_links WHERE user_id=:u AND deleted=false"),
|
||||
{"u": user_id},
|
||||
)
|
||||
).scalar_one()
|
||||
assert rows == 1
|
||||
|
||||
# ★ 옛 코드가 살아 있으면 둘 중 어느 것이 먹을지 화면이 말해 줄 수 없다.
|
||||
with pytest.raises(KakaoLinkError, match="KAKAO_LINK_CODE_INVALID"):
|
||||
await service.redeem(first, "kakao-key-6")
|
||||
assert await service.redeem(second, "kakao-key-6") == user_id
|
||||
|
||||
|
||||
async def test_이미_연결된_사장님은_코드를_다시_받지_않는다(db_engine):
|
||||
user_id = uuid.uuid4()
|
||||
await service.redeem((await service.issue_code(user_id))["code"], "kakao-key-7")
|
||||
with pytest.raises(KakaoLinkError, match="KAKAO_LINK_ALREADY"):
|
||||
await service.issue_code(user_id)
|
||||
|
||||
|
||||
async def test_한_카카오_계정은_한_사장님에만_묶인다(db_engine):
|
||||
"""없으면 같은 카톡 계정이 여러 사장님에 걸려 '어느 가게 이야기냐' 가 DB 에서 갈라진다."""
|
||||
first, second, key = uuid.uuid4(), uuid.uuid4(), "kakao-key-8"
|
||||
await service.redeem((await service.issue_code(first))["code"], key)
|
||||
code = (await service.issue_code(second))["code"]
|
||||
with pytest.raises(Exception): # 부분 유니크 위반 — 연결 자체가 성립하지 않는다
|
||||
await service.redeem(code, key)
|
||||
assert await service.resolve(key) == first
|
||||
|
||||
|
||||
async def test_해제하면_그_발화자는_다시_아무도_아니다(db_engine):
|
||||
user_id, key = uuid.uuid4(), "kakao-key-9"
|
||||
await service.redeem((await service.issue_code(user_id))["code"], key)
|
||||
await service.disconnect(user_id)
|
||||
assert await service.resolve(key) is None
|
||||
# 행은 남는다 — 지우면 누가 언제 연결했는지가 사라진다.
|
||||
async with db_engine.begin() as c:
|
||||
status = (
|
||||
await c.execute(
|
||||
text("SELECT status FROM owner_kakao_links WHERE user_id=:u"), {"u": user_id}
|
||||
)
|
||||
).scalar_one()
|
||||
assert status == "REVOKED"
|
||||
# 해제한 뒤에는 다시 연결할 수 있어야 한다.
|
||||
await service.redeem((await service.issue_code(user_id))["code"], key)
|
||||
assert await service.resolve(key) == user_id
|
||||
|
||||
|
||||
async def test_해제할_연결이_없으면_거절한다(db_engine):
|
||||
with pytest.raises(KakaoLinkError, match="KAKAO_LINK_NOT_FOUND"):
|
||||
await service.disconnect(uuid.uuid4())
|
||||
|
||||
|
||||
async def test_상태는_코드_평문을_돌려주지_않는다(db_engine):
|
||||
user_id = uuid.uuid4()
|
||||
await service.issue_code(user_id)
|
||||
snapshot = await service.state(user_id)
|
||||
assert snapshot["status"] == "PENDING"
|
||||
assert snapshot["code_expires_at"]
|
||||
assert "code" not in snapshot
|
||||
|
||||
|
||||
async def test_저장되는_것은_해시뿐이다(db_engine):
|
||||
user_id = uuid.uuid4()
|
||||
code = (await service.issue_code(user_id))["code"]
|
||||
async with db_engine.begin() as c:
|
||||
stored = (
|
||||
await c.execute(
|
||||
text("SELECT code_sha FROM owner_kakao_links WHERE user_id=:u"), {"u": user_id}
|
||||
)
|
||||
).scalar_one()
|
||||
assert stored != code
|
||||
assert len(stored) == 64
|
||||
|
||||
|
||||
async def test_라우터는_로그인_없이_열리지_않는다(client):
|
||||
for method, path in [
|
||||
("get", "/v1/agent/kakao/link"),
|
||||
("post", "/v1/agent/kakao/link/code"),
|
||||
("post", "/v1/agent/kakao/link/disconnect"),
|
||||
]:
|
||||
res = await getattr(client, method)(path)
|
||||
assert res.status_code in (401, 403), path
|
||||
|
||||
|
||||
async def test_코드는_응답에서_한_번만_나가고_캐시되지_않는다(client, auth_headers):
|
||||
h = await auth_headers("kakao-owner")
|
||||
res = await client.post("/v1/agent/kakao/link/code", headers=h)
|
||||
assert res.status_code == 200
|
||||
assert res.json()["code"]
|
||||
assert res.headers["Cache-Control"] == "no-store"
|
||||
assert res.headers["Referrer-Policy"] == "no-referrer"
|
||||
|
||||
state = await client.get("/v1/agent/kakao/link", headers=h)
|
||||
assert "code" not in state.json()
|
||||
|
||||
|
||||
def test_코드에는_헷갈리는_글자가_없다():
|
||||
"""잘못 읽어 실패하면 원인이 화면에 안 보이고 '연결이 안 된다' 로만 보인다."""
|
||||
assert not set("01OILl") & set(service._CODE_ALPHABET)
|
||||
assert len(service._new_code()) == service._CODE_LENGTH
|
||||
Reference in new issue
Block a user