fix: Test Cases

This commit is contained in:
Deepesh Garg 2021-07-22 10:43:16 +05:30
parent c765073c2a
commit 2ff0d3e0eb
2 changed files with 1 additions and 11 deletions

View File

@ -263,14 +263,6 @@ class TestPurchaseInvoice(unittest.TestCase):
})
pi.submit()
# gle = frappe.get_all(
# "GL Entry",
# fields = ['account', 'debit', 'credit', 'posting_date'],
# filters = {'voucher_no': pi.name}
# )
# for gl in gle:
# print(gl, "\n")
expected_gle = [
["_Test Account Cost for Goods Sold - _TC", 100.0, 0.0, nowdate()],
["_Test Account VAT - _TC", 20.0, 0.0, nowdate()],
@ -1196,7 +1188,6 @@ def check_gl_entries(doc, voucher_no, expected_gle, posting_date):
where voucher_type='Purchase Invoice' and voucher_no=%s and posting_date >= %s
order by posting_date asc, account asc""", (voucher_no, posting_date), as_dict=1)
print(gl_entries)
for i, gle in enumerate(gl_entries):
doc.assertEqual(expected_gle[i][0], gle.account)
doc.assertEqual(expected_gle[i][1], gle.debit)

View File

@ -2008,7 +2008,7 @@ class TestSalesInvoice(unittest.TestCase):
additional_discount_account = create_account(account_name="Discount Account",
parent_account="Indirect Expenses - _TC", company="_Test Company")
si = create_sales_invoice(rate=100, do_not_save=1)
si = create_sales_invoice(rate=100, parent_cost_center='Main - _TC', do_not_save=1)
si.apply_discount_on = "Grand Total"
si.additional_discount_account = additional_discount_account
si.additional_discount_percentage = 20
@ -2016,7 +2016,6 @@ class TestSalesInvoice(unittest.TestCase):
"charge_type": "Actual",
"account_head": "_Test Account VAT - _TC",
"cost_center": "Main - _TC",
"parent_cost_center": "Main - _TC",
"description": "Test",
"rate": 0,
"tax_amount": 20