Begin implementing better payment simulation
This commit is contained in:
@@ -237,3 +237,20 @@ class TestMoney(AggregatorPlatformMixin, TransactionTestCase):
|
||||
amount, expected_requisition[wallets_requisition.index(wallet)]
|
||||
)
|
||||
self.assertIn("Requisition", detail)
|
||||
|
||||
def test_collapse_pay_list(self):
|
||||
self.create_wallets()
|
||||
test_data = {
|
||||
"WALLET1": [
|
||||
(500.0, "Operator cut for 2 of 1 operators, total 1000.0"),
|
||||
(500.0, "Operator cut for 1 of 2 operators, total 1000.0"),
|
||||
],
|
||||
"WALLET2": [(0.0, "Platform Live cut for 1 of 1 payees, total 500.0")],
|
||||
}
|
||||
expected = {
|
||||
"WALLET1": 1000.0,
|
||||
"WALLET2": 0.0,
|
||||
}
|
||||
|
||||
collapsed = money.collapse_pay_list(test_data)
|
||||
self.assertDictEqual(collapsed, expected)
|
||||
|
||||
Reference in New Issue
Block a user