chore: linting issues

This commit is contained in:
Dany Robert 2023-01-30 10:45:08 +00:00
parent 1f6ab86a65
commit d69c839369

View File

@ -305,6 +305,7 @@ class TestGrossProfit(FrappeTestCase):
def test_order_connected_dn_and_inv(self):
from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order
"""
Test gp calculation when invoice and delivery note aren't directly connected.
SO -- INV
@ -348,7 +349,11 @@ class TestGrossProfit(FrappeTestCase):
do_not_submit=False,
)
from erpnext.selling.doctype.sales_order.sales_order import make_delivery_note, make_sales_invoice
from erpnext.selling.doctype.sales_order.sales_order import (
make_delivery_note,
make_sales_invoice,
)
make_delivery_note(so.name).submit()
sinv = make_sales_invoice(so.name).submit()
@ -357,8 +362,6 @@ class TestGrossProfit(FrappeTestCase):
)
columns, data = execute(filters=filters)
# Without Delivery Note, buying rate should be 150
expected_entry = {
"parent_invoice": sinv.name,
"currency": "INR",
@ -377,4 +380,4 @@ class TestGrossProfit(FrappeTestCase):
"gross_profit_%": -25.0,
}
gp_entry = [x for x in data if x.parent_invoice == sinv.name]
self.assertDictContainsSubset(expected_entry, gp_entry[0])
self.assertDictContainsSubset(expected_entry, gp_entry[0])