From ac6186e16f1e34f90f13e692dc36ed5a9a368df8 Mon Sep 17 00:00:00 2001 From: Dany Robert Date: Mon, 30 Jan 2023 10:45:08 +0000 Subject: [PATCH] chore: linting issues (cherry picked from commit d69c8393692fa8ecc08ff7f10ca66a1c5a9f3b0f) --- .../accounts/report/gross_profit/test_gross_profit.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/report/gross_profit/test_gross_profit.py b/erpnext/accounts/report/gross_profit/test_gross_profit.py index 027f6a842eb..06a173ee35a 100644 --- a/erpnext/accounts/report/gross_profit/test_gross_profit.py +++ b/erpnext/accounts/report/gross_profit/test_gross_profit.py @@ -304,6 +304,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 @@ -347,7 +348,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() @@ -356,8 +361,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", @@ -376,4 +379,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]) \ No newline at end of file + self.assertDictContainsSubset(expected_entry, gp_entry[0])