[fixes] minor fix in test-case

This commit is contained in:
Saurabh
2016-02-18 18:43:55 +05:30
parent fa32588e72
commit 7d5b47e113

View File

@@ -21,13 +21,13 @@ payment_method = [
{ {
"doctype": "Payment Gateway Account", "doctype": "Payment Gateway Account",
"is_default": 1, "is_default": 1,
"gateway": "_Test Gateway", "payment_gateway": "_Test Gateway",
"payment_account": "_Test Bank - _TC", "payment_account": "_Test Bank - _TC",
"currency": "INR" "currency": "INR"
}, },
{ {
"doctype": "Payment Gateway Account", "doctype": "Payment Gateway Account",
"gateway": "_Test Gateway", "payment_gateway": "_Test Gateway",
"payment_account": "_Test Bank USD - _TC", "payment_account": "_Test Bank USD - _TC",
"currency": "USD" "currency": "USD"
} }
@@ -39,7 +39,7 @@ class TestPaymentRequest(unittest.TestCase):
frappe.get_doc(payment_gateway).insert(ignore_permissions=True) frappe.get_doc(payment_gateway).insert(ignore_permissions=True)
for method in payment_method: for method in payment_method:
if not frappe.db.get_value("Payment Gateway Account", {"payment_gateway": method["gateway"], if not frappe.db.get_value("Payment Gateway Account", {"payment_gateway": method["payment_gateway"],
"currency": method["currency"]}, "name"): "currency": method["currency"]}, "name"):
frappe.get_doc(method).insert(ignore_permissions=True) frappe.get_doc(method).insert(ignore_permissions=True)