pharmacy-pos-qr-system/backend/test_wholesale_integration.py
thug0bin c1596a6d35 feat: 도매상 API 통합 및 스키마 업데이트
- wholesale 패키지 연동 (SooinSession, GeoYoungSession)
- Flask Blueprint 분리 (sooin_api.py, geoyoung_api.py)
- order_context 스키마 확장 (wholesaler_id, internal_code 등)
- 수인약품 개별 취소 기능 (cancel_item, restore_item)
- 문서 추가: WHOLESALE_API_INTEGRATION.md
- 테스트 스크립트들
2026-03-06 11:50:46 +09:00

33 lines
966 B
Python

# -*- coding: utf-8 -*-
"""wholesale 통합 테스트"""
import wholesale_path
from wholesale import SooinSession, GeoYoungSession
print('=== 도매상 API 통합 테스트 ===\n')
# 수인약품 테스트
print('1. 수인약품 테스트')
sooin = SooinSession()
if sooin.login():
print(' ✅ 로그인 성공')
result = sooin.search_products('073100220')
print(f' ✅ 검색: {result["total"]}개 결과')
cart = sooin.get_cart()
print(f' ✅ 장바구니: {cart["total_items"]}')
else:
print(' ❌ 로그인 실패')
# 지오영 테스트
print('\n2. 지오영 테스트')
geo = GeoYoungSession()
if geo.login():
print(' ✅ 로그인 성공')
result = geo.search_products('레바미피드')
print(f' ✅ 검색: {result["total"]}개 결과')
cart = geo.get_cart()
print(f' ✅ 장바구니: {cart["total_items"]}')
else:
print(' ❌ 로그인 실패')
print('\n=== 테스트 완료 ===')