fix: bugs-01
This commit is contained in:
@@ -37,14 +37,14 @@ class TestDedupRules:
|
||||
b = _make_tx(order_no="ORD002", counterparty_name="B", self_account_tail_no="2222")
|
||||
assert not is_duplicate_pair(a, b)
|
||||
|
||||
def test_same_amount_close_time_same_tail(self):
|
||||
def test_same_amount_close_time_same_tail_should_not_dedup(self):
|
||||
a = _make_tx(order_no="", amount=5000)
|
||||
b = _make_tx(
|
||||
order_no="",
|
||||
amount=5000,
|
||||
trade_time=datetime(2026, 3, 8, 10, 3, tzinfo=timezone.utc),
|
||||
)
|
||||
assert is_duplicate_pair(a, b)
|
||||
assert not is_duplicate_pair(a, b)
|
||||
|
||||
def test_same_amount_far_time(self):
|
||||
a = _make_tx(order_no="", amount=5000)
|
||||
@@ -55,6 +55,16 @@ class TestDedupRules:
|
||||
)
|
||||
assert not is_duplicate_pair(a, b)
|
||||
|
||||
def test_same_amount_close_time_same_counterparty_should_not_dedup(self):
|
||||
a = _make_tx(order_no="", amount=8000, counterparty_name="刷单账户A")
|
||||
b = _make_tx(
|
||||
order_no="",
|
||||
amount=8000,
|
||||
counterparty_name="刷单账户A",
|
||||
trade_time=datetime(2026, 3, 8, 10, 2, tzinfo=timezone.utc),
|
||||
)
|
||||
assert not is_duplicate_pair(a, b)
|
||||
|
||||
|
||||
class TestTransitRules:
|
||||
def test_keyword_match(self):
|
||||
|
||||
Reference in New Issue
Block a user