完成LSFX Mock第二期稳定随机命中后端实施
This commit is contained in:
@@ -87,6 +87,54 @@ def test_build_seed_statements_for_rule_plan_should_generate_withdraw_cnt_sample
|
||||
) >= 4
|
||||
|
||||
|
||||
def test_build_seed_statements_for_rule_plan_should_only_include_requested_phase2_rules():
|
||||
plan = {
|
||||
"large_transaction_hit_rules": [],
|
||||
"phase1_hit_rules": [],
|
||||
"phase2_statement_hit_rules": [
|
||||
"MULTI_PARTY_GAMBLING_TRANSFER",
|
||||
"SALARY_QUICK_TRANSFER",
|
||||
],
|
||||
"phase2_baseline_hit_rules": [],
|
||||
}
|
||||
|
||||
statements = build_seed_statements_for_rule_plan(
|
||||
group_id=1000,
|
||||
log_id=30001,
|
||||
rule_plan=plan,
|
||||
)
|
||||
|
||||
assert any(item["userMemo"] == "工资入账" for item in statements)
|
||||
assert any(item["customerName"] == "欢乐游戏科技有限公司" for item in statements)
|
||||
assert not any(item["userMemo"] == "季度稳定兼职收入" for item in statements)
|
||||
|
||||
|
||||
def test_salary_quick_transfer_and_salary_unused_should_use_different_identity_groups():
|
||||
plan = {
|
||||
"large_transaction_hit_rules": [],
|
||||
"phase1_hit_rules": [],
|
||||
"phase2_statement_hit_rules": [
|
||||
"SALARY_QUICK_TRANSFER",
|
||||
"SALARY_UNUSED",
|
||||
],
|
||||
"phase2_baseline_hit_rules": [],
|
||||
}
|
||||
|
||||
statements = build_seed_statements_for_rule_plan(
|
||||
group_id=1000,
|
||||
log_id=30001,
|
||||
rule_plan=plan,
|
||||
)
|
||||
|
||||
salary_id_cards = {
|
||||
item["cretNo"]
|
||||
for item in statements
|
||||
if item["userMemo"] == "工资入账"
|
||||
}
|
||||
|
||||
assert len(salary_id_cards) >= 2
|
||||
|
||||
|
||||
def test_large_transaction_seed_should_cover_all_eight_rules():
|
||||
"""大额交易样本生成器必须覆盖 8 条已实现规则的关键口径。"""
|
||||
statements = build_large_transaction_seed_statements(group_id=1000, log_id=20001)
|
||||
|
||||
Reference in New Issue
Block a user