Bump platform and requisition throughput on successful trades

This commit is contained in:
2023-03-20 13:54:56 +00:00
parent 9627fb7d41
commit 04f5595a86
10 changed files with 139 additions and 28 deletions

View File

@@ -156,3 +156,18 @@ class TestPlatform(AggregatorPlatformMixin, TransactionTestCase):
expected = "CUSTOM PAYMENT"
self.assertEqual(result, expected)
async def test_successful_withdrawal(self):
self.platform.throughput = 100
self.req.throughput = 100
self.platform.save()
self.req.save()
await self.plat_client.successful_withdrawal()
self.platform.refresh_from_db()
self.req.refresh_from_db()
self.assertEqual(self.platform.throughput, 0)
self.assertEqual(self.req.throughput, 0)