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 - 테스트 스크립트들
This commit is contained in:
32
backend/test_wholesale_integration.py
Normal file
32
backend/test_wholesale_integration.py
Normal file
@@ -0,0 +1,32 @@
|
||||
# -*- 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=== 테스트 완료 ===')
|
||||
Reference in New Issue
Block a user