mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-30 02:14:48 +00:00
refactor(test): set instance variables before calling utility method
This commit is contained in:
@@ -772,7 +772,7 @@ class TestAccountsReceivable(ERPNextTestSuite, AccountsTestMixin):
|
|||||||
|
|
||||||
def test_party_account_filter(self):
|
def test_party_account_filter(self):
|
||||||
si1 = self.create_sales_invoice()
|
si1 = self.create_sales_invoice()
|
||||||
self.customer2 = frappe.get_doc(
|
jane = frappe.get_doc(
|
||||||
{
|
{
|
||||||
"doctype": "Customer",
|
"doctype": "Customer",
|
||||||
"customer_name": "Jane Doe",
|
"customer_name": "Jane Doe",
|
||||||
@@ -781,9 +781,9 @@ class TestAccountsReceivable(ERPNextTestSuite, AccountsTestMixin):
|
|||||||
}
|
}
|
||||||
).insert()
|
).insert()
|
||||||
|
|
||||||
|
self.customer = jane.name
|
||||||
si2 = self.create_sales_invoice(do_not_submit=True)
|
si2 = self.create_sales_invoice(do_not_submit=True)
|
||||||
si2.posting_date = add_days(today(), -1)
|
si2.posting_date = add_days(today(), -1)
|
||||||
si2.customer = self.customer2.name
|
|
||||||
si2.currency = "USD"
|
si2.currency = "USD"
|
||||||
si2.conversion_rate = 80
|
si2.conversion_rate = 80
|
||||||
si2.debit_to = self.debtors_usd
|
si2.debit_to = self.debtors_usd
|
||||||
@@ -991,7 +991,7 @@ class TestAccountsReceivable(ERPNextTestSuite, AccountsTestMixin):
|
|||||||
self.assertEqual(expected_data, report_output)
|
self.assertEqual(expected_data, report_output)
|
||||||
|
|
||||||
def test_future_payments_on_foreign_currency(self):
|
def test_future_payments_on_foreign_currency(self):
|
||||||
self.customer2 = frappe.get_doc(
|
jane = frappe.get_doc(
|
||||||
{
|
{
|
||||||
"doctype": "Customer",
|
"doctype": "Customer",
|
||||||
"customer_name": "Jane Doe",
|
"customer_name": "Jane Doe",
|
||||||
@@ -999,10 +999,10 @@ class TestAccountsReceivable(ERPNextTestSuite, AccountsTestMixin):
|
|||||||
"default_currency": "USD",
|
"default_currency": "USD",
|
||||||
}
|
}
|
||||||
).insert()
|
).insert()
|
||||||
|
self.customer = jane.name
|
||||||
|
|
||||||
si = self.create_sales_invoice(do_not_submit=True)
|
si = self.create_sales_invoice(do_not_submit=True)
|
||||||
si.posting_date = add_days(today(), -1)
|
si.posting_date = add_days(today(), -1)
|
||||||
si.customer = self.customer2.name
|
|
||||||
si.currency = "USD"
|
si.currency = "USD"
|
||||||
si.conversion_rate = 80
|
si.conversion_rate = 80
|
||||||
si.debit_to = self.debtors_usd
|
si.debit_to = self.debtors_usd
|
||||||
|
|||||||
Reference in New Issue
Block a user