Skip to content

Commit

Permalink
chore: filter report output on document name
Browse files Browse the repository at this point in the history
  • Loading branch information
ruthra-kumar committed Nov 11, 2024
1 parent 2bce735 commit 762f3ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions erpnext/accounts/report/sales_register/test_sales_register.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_basic_report_output(self):
filters = frappe._dict({"from_date": today(), "to_date": today(), "company": self.company})
report = execute(filters)

self.assertEqual(len(report[1]), 1)
res = [x for x in report[1] if x.get("voucher_no") == si.name]

expected_result = {
"voucher_type": si.doctype,
Expand All @@ -72,7 +72,7 @@ def test_basic_report_output(self):
"debit": 98.0,
}

report_output = {k: v for k, v in report[1][0].items() if k in expected_result}
report_output = {k: v for k, v in res[0].items() if k in expected_result}
self.assertDictEqual(report_output, expected_result)

def test_journal_with_cost_center_filter(self):
Expand Down

0 comments on commit 762f3ba

Please sign in to comment.