Skip to content

Commit

Permalink
test: patch payments app interface
Browse files Browse the repository at this point in the history
  • Loading branch information
blaggacao committed Apr 3, 2024
1 parent ec675ea commit a8cd850
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion erpnext/selling/doctype/sales_order/test_sales_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# License: GNU General Public License v3. See license.txt

import json
from unittest.mock import patch

import frappe
import frappe.permissions
Expand Down Expand Up @@ -1956,7 +1957,12 @@ def test_expired_rate_for_packed_item(self):
self.assertEqual(so.items[0].rate, scenario.get("expected_rate"))
self.assertEqual(so.packed_items[0].rate, scenario.get("expected_rate"))

def test_sales_order_advance_payment_status(self):
@patch(
# this also shadows one (1) call to _get_payment_gateway_controller
"erpnext.accounts.doctype.payment_request.payment_request.PaymentRequest.get_payment_url",
return_value=None,
)
def test_sales_order_advance_payment_status(self, mocked_get_payment_url):
from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry
from erpnext.accounts.doctype.payment_request.payment_request import make_payment_request

Expand Down

0 comments on commit a8cd850

Please sign in to comment.