You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
856 B
Python

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

def test_seed_counts(client):
assert len(client.get("/api/people").json()) == 5
tree = client.get("/api/tree").json()
assert len(tree) == 2
# 최상위 작업 11개 (k1,k2,k5,k6,k4,k3,k13,k10,k14,k20,k21)
work = client.get("/api/tasks?area=work").json()
life = client.get("/api/tasks?area=life").json()
assert len(work) + len(life) == 11
# 인박스 4건, s1 은 new
inbox = {i["id"]: i for i in client.get("/api/inbox").json()}
assert set(inbox) == {"s1", "s2", "s3", "s4"}
assert inbox["s1"]["status"] == "new"
assert inbox["s1"]["classification"]["proj_label"] == "개인 여행 — 한국"
def test_seed_person_color(client):
people = {p["id"]: p for p in client.get("/api/people").json()}
assert people["sua"]["color"] == "oklch(0.66 0.13 200)"
assert people["jiwoo"]["is_me"] is True