# -*- 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']}")
