feat: 카드 해시태그(hashtags) — 인스타 캡션 뒤에만 붙고 날씨각 피드에는 안 나감

This commit is contained in:
minaChoi committed 2026-10-24 13:32:24 +09:00
1 parent a630faea4c
commit 14ca71a41c
5 files changed
+7 -4

No files matched your search

+2 -2
View File
@@ -112,7 +112,7 @@ async def test_instagram_publish_carousel_and_store_media_id(offline, admin_key,
assert data["access_token"] == "tok"
if request.url.path.endswith("/1789/media"):
if data.get("media_type") == "CAROUSEL":
assert data["children"] == "c1,c2,c3" and data["caption"].startswith("오늘의 썸 타로")
assert data["children"] == "c1,c2,c3" and data["caption"] == "오늘의 썸 타로\n\n한 장 골라 보세요\n\n#날씨각 #날씨타로"
return httpx.Response(200, json={"id": "car"})
assert data["image_url"].startswith("https://weather.example/v1/card/") and data["is_carousel_item"] == "true"
return httpx.Response(200, json={"id": f"c{len([c for c in calls if 'is_carousel_item' in c[1]])}"})
@@ -126,7 +126,7 @@ async def test_instagram_publish_carousel_and_store_media_id(offline, admin_key,
real = httpx.AsyncClient
monkeypatch.setattr(instagram.httpx, "AsyncClient", lambda **kw: real(transport=httpx.MockTransport(handler)))
async with client() as c:
made = (await c.post("/v1/card", json=body(publish=True), headers=admin_key)).json()
made = (await c.post("/v1/card", json=body(publish=True, hashtags="#날씨각 #날씨타로"), headers=admin_key)).json()
res = (await c.post(f"/v1/card/{made['card_id']}/instagram", headers=admin_key)).json()
again = (await c.post(f"/v1/card/{made['card_id']}/instagram", headers=admin_key)).json()
listed = (await c.get("/v1/card", headers=admin_key)).json()["items"][0]