feat: 10/20 회의 반영 — 이야기 탭을 오늘 피드로 합침(글쓰기 칸·사진 올리기·위치 정보 삭제), 오늘의 각 카드와 히어로·각 공유 템플릿, 나만의 각을 이름+날씨 조건 저장으로, 로그인 없이 좋아요(IP 해시), 피드 순서·불쾌지수 상시·포스트 그림 배경, 새 각 아이콘
This commit is contained in:
1 parent
017022a0b0
commit
d0213f41a6
81 files changed
+3503
-593
No files matched your search
@@ -151,6 +151,27 @@ def test_arrange_orders_by_slot_and_keeps_same_types_apart():
|
||||
assert night[:3] == [PostType.ALERT, PostType.WEATHER, PostType.TOMORROW] and night[-1] is PostType.QUOTE
|
||||
|
||||
|
||||
def test_arrange_puts_shareable_cards_before_plain_info():
|
||||
"""주말·노을·행사는 앞쪽 절반, 공기·자외선·상식은 각 뒤로."""
|
||||
from datetime import datetime
|
||||
|
||||
from common.utils.kma_time import KST
|
||||
from services.feed_service import arrange
|
||||
|
||||
sunset = datetime(2026, 10, 1, 18, 10, tzinfo=KST)
|
||||
cards = [_card(t, n) for n, t in enumerate([
|
||||
PostType.WEATHER, PostType.ALERT, PostType.GAK, PostType.GAK, PostType.GAK, PostType.SUNSET, PostType.TOMORROW, PostType.WEEK,
|
||||
PostType.EVENT, PostType.EVENT, PostType.SEASON, PostType.TIP, PostType.QUOTE, PostType.WEEKEND_PLAN, PostType.AIR, PostType.UV, PostType.MOON,
|
||||
])]
|
||||
for slot, h in (("morning", 8), ("day", 13), ("evening", 17), ("evening", 19), ("night", 22)):
|
||||
out = [c.post_type for c in arrange(cards, slot, datetime(2026, 10, 1, h, tzinfo=KST), sunset, False, "2026-10-01:1114000000")]
|
||||
half = len(out) // 2
|
||||
assert PostType.SUNSET in out[:half] and PostType.WEEK in out[:half], (slot, out)
|
||||
assert all(i < half + 2 for i, t in enumerate(out) if t is PostType.EVENT), (slot, out)
|
||||
first_gak = out.index(PostType.GAK)
|
||||
assert all(out.index(t) > first_gak for t in (PostType.AIR, PostType.TIP) if t in out), (slot, out)
|
||||
|
||||
|
||||
def test_arrange_scatters_up_to_three_events_same_spot_all_day():
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
Reference in new issue
Block a user