ETL 完成
This commit is contained in:
@@ -23,7 +23,7 @@ def _build_config(tmp_path):
|
||||
|
||||
|
||||
def test_assistant_accounts_masters_ingest(tmp_path):
|
||||
"""Ensure assistant_accounts_masterS task stores raw payload with record_index dedup keys."""
|
||||
"""Ensure ODS_ASSISTANT_ACCOUNT stores raw payload with record_index dedup keys."""
|
||||
config = _build_config(tmp_path)
|
||||
sample = [
|
||||
{
|
||||
@@ -33,7 +33,7 @@ def test_assistant_accounts_masters_ingest(tmp_path):
|
||||
}
|
||||
]
|
||||
api = FakeAPIClient({"/PersonnelManagement/SearchAssistantInfo": sample})
|
||||
task_cls = ODS_TASK_CLASSES["assistant_accounts_masterS"]
|
||||
task_cls = ODS_TASK_CLASSES["ODS_ASSISTANT_ACCOUNT"]
|
||||
|
||||
with get_db_operations() as db_ops:
|
||||
task = task_cls(config, db_ops, api, logging.getLogger("test_assistant_accounts_masters"))
|
||||
@@ -50,7 +50,7 @@ def test_assistant_accounts_masters_ingest(tmp_path):
|
||||
|
||||
|
||||
def test_goods_stock_movements_ingest(tmp_path):
|
||||
"""Ensure goods_stock_movements task stores raw payload with record_index dedup keys."""
|
||||
"""Ensure ODS_INVENTORY_CHANGE stores raw payload with record_index dedup keys."""
|
||||
config = _build_config(tmp_path)
|
||||
sample = [
|
||||
{
|
||||
@@ -60,7 +60,7 @@ def test_goods_stock_movements_ingest(tmp_path):
|
||||
}
|
||||
]
|
||||
api = FakeAPIClient({"/GoodsStockManage/QueryGoodsOutboundReceipt": sample})
|
||||
task_cls = ODS_TASK_CLASSES["goods_stock_movements"]
|
||||
task_cls = ODS_TASK_CLASSES["ODS_INVENTORY_CHANGE"]
|
||||
|
||||
with get_db_operations() as db_ops:
|
||||
task = task_cls(config, db_ops, api, logging.getLogger("test_goods_stock_movements"))
|
||||
@@ -110,11 +110,11 @@ def test_ods_payment_ingest(tmp_path):
|
||||
|
||||
|
||||
def test_ods_settlement_records_ingest(tmp_path):
|
||||
"""Ensure settlement_records task stores settleList raw JSON."""
|
||||
"""Ensure ODS_SETTLEMENT_RECORDS stores settleList raw JSON."""
|
||||
config = _build_config(tmp_path)
|
||||
sample = [{"data": {"settleList": [{"id": 701, "orderTradeNo": 8001}]}}]
|
||||
sample = [{"id": 701, "orderTradeNo": 8001}]
|
||||
api = FakeAPIClient({"/Site/GetAllOrderSettleList": sample})
|
||||
task_cls = ODS_TASK_CLASSES["settlement_records"]
|
||||
task_cls = ODS_TASK_CLASSES["ODS_SETTLEMENT_RECORDS"]
|
||||
|
||||
with get_db_operations() as db_ops:
|
||||
task = task_cls(config, db_ops, api, logging.getLogger("test_settlement_records"))
|
||||
|
||||
Reference in New Issue
Block a user