Skip to content

Commit

Permalink
chore: linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rtdany10 committed Jan 30, 2023
1 parent 1f6ab86 commit d69c839
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions erpnext/accounts/report/gross_profit/test_gross_profit.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ def test_bundled_delivery_note_with_different_warehouses(self):

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
Expand Down Expand Up @@ -348,7 +349,11 @@ def test_order_connected_dn_and_inv(self):
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()

Expand All @@ -357,8 +362,6 @@ def test_order_connected_dn_and_inv(self):
)

columns, data = execute(filters=filters)

# Without Delivery Note, buying rate should be 150
expected_entry = {
"parent_invoice": sinv.name,
"currency": "INR",
Expand All @@ -377,4 +380,4 @@ def test_order_connected_dn_and_inv(self):
"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])

0 comments on commit d69c839

Please sign in to comment.