Skip to content

Commit

Permalink
test: cover more reports in test
Browse files Browse the repository at this point in the history
  • Loading branch information
ankush committed Jan 25, 2022
1 parent c6a17d1 commit f5f3552
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions erpnext/stock/report/test_reports.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import unittest
from typing import List, Tuple

import frappe

from erpnext.tests.utils import ReportFilters, ReportName, execute_script_report

DEFAULT_FILTERS = {
Expand All @@ -10,8 +12,12 @@
}


batch = frappe.db.get_value("Batch", fieldname=["name"], as_dict=True, order_by="creation desc")

REPORT_FILTER_TEST_CASES: List[Tuple[ReportName, ReportFilters]] = [
("Stock Ledger", {"_optional": True}),
("Stock Ledger", {"batch_no": batch}),
("Stock Ledger", {"item_code": "_Test Item", "warehouse": "_Test Warehouse - _TC"}),
("Stock Balance", {"_optional": True}),
("Stock Projected Qty", {"_optional": True}),
("Batch-Wise Balance History", {}),
Expand Down Expand Up @@ -40,6 +46,13 @@
("Item Variant Details", {"item": "_Test Variant Item",}),
("Total Stock Summary", {"group_by": "warehouse",}),
("Batch Item Expiry Status", {}),
("Incorrect Stock Value Report", {"company": "_Test Company with perpetual inventory"}),
("Incorrect Serial No Valuation", {}),
("Incorrect Balance Qty After Transaction", {}),
("Supplier-Wise Sales Analytics", {}),
("Item Prices", {"items": "Enabled Items only"}),
("Delayed Item Report", {"based_on": "Sales Invoice"}),
("Delayed Item Report", {"based_on": "Delivery Note"}),
("Stock Ageing", {"range1": 30, "range2": 60, "range3": 90, "_optional": True}),
("Stock Ledger Invariant Check",
{
Expand Down

0 comments on commit f5f3552

Please sign in to comment.