- internal_code DB 저장 → 프론트에서 선택한 제품 그대로 주문 - 기존 장바구니 백업/복구로 사용자 장바구니 보존 - 수인약품 submit_order() 수정 (체크박스 제외 방식) - 테스트 파일 정리 및 문서 추가
50 lines
1.0 KiB
Python
50 lines
1.0 KiB
Python
# -*- coding: utf-8 -*-
|
|
"""지오영 full_order vs quick_order 비교 테스트"""
|
|
import sys; sys.path.insert(0, '.'); import wholesale_path
|
|
|
|
import importlib
|
|
import wholesale.geoyoung
|
|
importlib.reload(wholesale.geoyoung)
|
|
from wholesale import GeoYoungSession
|
|
|
|
GeoYoungSession._instance = None
|
|
g = GeoYoungSession()
|
|
g.login()
|
|
g.clear_cart()
|
|
|
|
print('='*60)
|
|
print('테스트 1: quick_order 직접 호출')
|
|
print('='*60)
|
|
|
|
result1 = g.quick_order(
|
|
kd_code='라식스',
|
|
quantity=1,
|
|
spec=None,
|
|
check_stock=True
|
|
)
|
|
print(f"결과: {result1}")
|
|
|
|
print('\n' + '='*60)
|
|
print('테스트 2: full_order 호출 (auto_confirm=False)')
|
|
print('='*60)
|
|
|
|
g.clear_cart()
|
|
|
|
result2 = g.full_order(
|
|
kd_code='코자정',
|
|
quantity=1,
|
|
specification=None,
|
|
check_stock=True,
|
|
auto_confirm=False # 장바구니만
|
|
)
|
|
print(f"결과: {result2}")
|
|
|
|
print('\n' + '='*60)
|
|
print('장바구니 확인')
|
|
print('='*60)
|
|
|
|
cart = g.get_cart()
|
|
print(f"장바구니: {cart['total_items']}개")
|
|
for item in cart['items']:
|
|
print(f" - {item['product_name']}")
|