feat(카페24): 품목 진열·판매 멀티쇼핑몰 일괄 맞춤 스크립트
- python -m app.modules.cafe24.sync_variant_flags --shops 3,4 [--apply] - 옵션 상품 전체의 기본몰(1) 품목 진열·판매를 지정 쇼핑몰에 같은 값으로(다른 값만 PUT) - 기본 미리보기, BEFORE 줄로 원래 값 출력(되돌리기용), 감사 actor SYNC_SHOPS Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1091,6 +1091,17 @@ def test_parse_shop_nos():
|
||||
assert store.parse_shop_nos("2, 3,1,x,0,3") == [1, 2, 3]
|
||||
|
||||
|
||||
def test_plan_flag_sync():
|
||||
from app.modules.cafe24.sync_variant_flags import plan_flag_sync
|
||||
|
||||
base = [{"variant_code": "A", "display": True, "selling": False},
|
||||
{"variant_code": "B", "display": True, "selling": True},
|
||||
{"variant_code": "C", "display": False, "selling": False}]
|
||||
shop = [{"variant_code": "A", "display": "F", "selling": "F"},
|
||||
{"variant_code": "B", "display": "T", "selling": "T"}] # C 는 그 쇼핑몰에 없음
|
||||
assert plan_flag_sync(base, shop) == [{"variant_code": "A", "display": "T"}]
|
||||
|
||||
|
||||
def test_parse_grace_minutes():
|
||||
assert store.parse_grace_minutes("30") == 30
|
||||
assert store.parse_grace_minutes("") == store.DEFAULT_READ_LAG_GRACE_MIN
|
||||
|
||||
Reference in New Issue
Block a user