mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-20 03:47:11 +00:00
test: reuse BootStrapTestData master data to reduce runtime
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
|
||||
import frappe
|
||||
|
||||
from erpnext.stock.doctype.item.test_item import make_item
|
||||
from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry
|
||||
from erpnext.stock.report.fifo_queue_vs_qty_after_transaction_comparison.fifo_queue_vs_qty_after_transaction_comparison import (
|
||||
execute,
|
||||
@@ -16,14 +15,15 @@ class TestFifoQueueVsQtyAfterTransactionComparison(ERPNextTestSuite):
|
||||
return execute(frappe._dict(filters))[1]
|
||||
|
||||
def test_healthy_fifo_item_no_mismatch(self):
|
||||
item = make_item(properties={"is_stock_item": 1, "valuation_method": "FIFO"}).name
|
||||
warehouse = "_Test Warehouse - _TC"
|
||||
item = "_Test Item"
|
||||
warehouse = "Stores - _TC"
|
||||
frappe.db.set_value("Item", item, "valuation_method", "FIFO")
|
||||
|
||||
make_stock_entry(item_code=item, to_warehouse=warehouse, qty=10, rate=100, posting_date="2026-06-01")
|
||||
make_stock_entry(item_code=item, to_warehouse=warehouse, qty=5, rate=120, posting_date="2026-06-01")
|
||||
make_stock_entry(item_code=item, from_warehouse=warehouse, qty=4, posting_date="2026-06-02")
|
||||
|
||||
data = self.run_report({"company": "_Test Company", "item_code": item})
|
||||
data = self.run_report({"company": "_Test Company", "item_code": item, "warehouse": warehouse})
|
||||
|
||||
item_codes = [row.get("item_code") for row in data if row]
|
||||
self.assertNotIn(item, item_codes)
|
||||
|
||||
Reference in New Issue
Block a user