feat: 구름 합치기 GA4 이벤트 — game_start(첫 그림)·game_round(라운드 깸)·game_over(넘침)
This commit is contained in:
1 parent
63b4fa74fe
commit
df3fba720c
26 files changed
+330
-900
No files matched your search
@@ -37,8 +37,6 @@ async def test_reading_for_anyone_gives_me_today_and_cards(offline):
|
||||
assert r["me"]["scene"].endswith("기운") and r["today"]["title"] and 0 <= r["today"]["score"] <= 100
|
||||
kinds = [x["kind"] for x in r["today"]["cards"]]
|
||||
assert "when" in kinds and "do" in kinds and "wear" in kinds
|
||||
# 근거 줄은 쉬운 말 + 괄호 용어, 숫자 없이
|
||||
assert r["today"]["why"] and not any(ch.isdigit() for w in r["today"]["why"] for ch in w)
|
||||
# 로그인 안 하면 레벨로 여는 것은 모두 잠김, 내용도 안 옴
|
||||
assert r["logged_in"] is False and all(not x["unlocked"] for x in r["locks"])
|
||||
assert "week" not in r and "love" not in r and "money" not in r
|
||||
@@ -70,7 +68,7 @@ async def test_level_unlocks_sections_and_awards_once(offline):
|
||||
|
||||
h7 = await _login(c, "saju_07", points=1000)
|
||||
r = (await c.post("/v1/saju/reading", json=BIRTH, headers=h7)).json()
|
||||
assert r["month"]["title"].endswith("달") and "년" in r["year"]["label"] and 1 <= len(r["year"]["months"]) <= 3
|
||||
assert r["month"]["title"].endswith("달") and "년" in r["year"]["label"] and len(r["year"]["months"]) == 3
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
@@ -83,27 +81,3 @@ async def test_match_needs_level_five(offline):
|
||||
h5 = await _login(c, "match_05", points=400)
|
||||
m = (await c.post("/v1/saju/match", json=body, headers=h5)).json()
|
||||
assert m["title"].endswith("사이") and m["lines"] and 0 <= m["score"] <= 100 and m["day"]["weekday"] and m["friend_scene"].endswith("기운")
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
async def test_match_score_is_same_whoever_goes_first(offline):
|
||||
a, b = {"birth_date": "1995-03-14"}, {"birth_date": "1996-11-02"}
|
||||
async with client() as c:
|
||||
h = await _login(c, "match_sym", points=400)
|
||||
ab = (await c.post("/v1/saju/match", json={"region_code": REGION, "me": a, "friend": b}, headers=h)).json()
|
||||
ba = (await c.post("/v1/saju/match", json={"region_code": REGION, "me": b, "friend": a}, headers=h)).json()
|
||||
assert ab["score"] == ba["score"]
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
async def test_birth_is_saved_to_account(offline):
|
||||
body = {"birth_date": "1995-03-14", "birth_time": "07:30", "place": "busan", "gender": "female"}
|
||||
async with client() as c:
|
||||
assert (await c.get("/v1/saju/birth")).status_code == 401
|
||||
h = await _login(c, "birth_01")
|
||||
assert "birth" not in (await c.get("/v1/saju/birth", headers=h)).json()
|
||||
assert (await c.put("/v1/saju/birth", json=body, headers=h)).json()["birth"] == body
|
||||
assert (await c.get("/v1/saju/birth", headers=h)).json()["birth"] == body
|
||||
assert (await c.put("/v1/saju/birth", json={**body, "birth_date": "1899-12-31"}, headers=h)).json()["result"]["desc"] == "INVALID_INPUT"
|
||||
await c.delete("/v1/saju/birth", headers=h)
|
||||
assert "birth" not in (await c.get("/v1/saju/birth", headers=h)).json()
|
||||
Reference in new issue
Block a user