Skip to content

Commit

Permalink
fix(test): Remove test for gateway_fee
Browse files Browse the repository at this point in the history
* We don't charge this since we started commissions
  • Loading branch information
rutwikhdev committed May 29, 2023
1 parent c641b43 commit 126a691
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions press/press/doctype/payout_order/test_payout_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@ def test_net_amount_calculations_inr(self):
self.assertEqual(len(po.items), 1)
self.assertEqual(po.items[0].invoice, self.test_invoice.name)
self.assertEqual(po.items[0].total_amount, 40.0)
self.assertEqual(po.items[0].gateway_fee, (200 / 1000) * 40)
self.assertEqual(po.items[0].net_amount, 32.0)
self.assertEqual(po.items[0].net_amount, 40.0)
self.assertEqual(po.items[0].currency, "INR")

self.assertEqual(po.net_total_inr, 32.0)
self.assertEqual(po.net_total_inr, 40.0)
self.assertEqual(po.net_total_usd, 0)

def test_net_amount_calculations_usd(self):
Expand All @@ -66,13 +65,11 @@ def test_net_amount_calculations_usd(self):
self.assertEqual(po.items[0].invoice, self.test_invoice.name)
self.assertEqual(po.items[0].total_amount, 20.0)

expected_gateway_fee = 14.4
self.assertEqual(po.items[0].gateway_fee, expected_gateway_fee)
self.assertEqual(po.items[0].net_amount, 20.0 - expected_gateway_fee)
self.assertEqual(po.items[0].net_amount, 20.0)
self.assertEqual(po.items[0].currency, "USD")

self.assertEqual(po.net_total_inr, 0)
self.assertEqual(po.net_total_usd, 20.0 - expected_gateway_fee)
self.assertEqual(po.net_total_usd, 20.0)

def create_test_inr_invoice(self):
self.test_team = create_test_team()
Expand Down

0 comments on commit 126a691

Please sign in to comment.