mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-16 07:58:38 +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,14 +3,13 @@
|
||||
|
||||
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.incorrect_balance_qty_after_transaction.incorrect_balance_qty_after_transaction import (
|
||||
execute,
|
||||
)
|
||||
from erpnext.tests.utils import ERPNextTestSuite
|
||||
|
||||
WAREHOUSE = "_Test Warehouse - _TC"
|
||||
WAREHOUSE = "Stores - _TC"
|
||||
COMPANY = "_Test Company"
|
||||
|
||||
|
||||
@@ -21,7 +20,7 @@ class TestIncorrectBalanceQtyAfterTransaction(ERPNextTestSuite):
|
||||
return execute(filters)[1]
|
||||
|
||||
def test_healthy_stock_not_flagged(self):
|
||||
item = make_item(properties={"is_stock_item": 1}).name
|
||||
item = "_Test Item"
|
||||
make_stock_entry(item_code=item, to_warehouse=WAREHOUSE, qty=10, rate=100, posting_date="2026-06-01")
|
||||
make_stock_entry(item_code=item, from_warehouse=WAREHOUSE, qty=4, rate=100, posting_date="2026-06-02")
|
||||
|
||||
@@ -30,7 +29,7 @@ class TestIncorrectBalanceQtyAfterTransaction(ERPNextTestSuite):
|
||||
self.assertEqual(flagged, [])
|
||||
|
||||
def test_sequence_of_movements_not_flagged(self):
|
||||
item = make_item(properties={"is_stock_item": 1}).name
|
||||
item = "_Test Item 2"
|
||||
make_stock_entry(item_code=item, to_warehouse=WAREHOUSE, qty=20, rate=50, posting_date="2026-06-01")
|
||||
make_stock_entry(item_code=item, from_warehouse=WAREHOUSE, qty=5, rate=50, posting_date="2026-06-02")
|
||||
make_stock_entry(item_code=item, to_warehouse=WAREHOUSE, qty=8, rate=50, posting_date="2026-06-03")
|
||||
|
||||
Reference in New Issue
Block a user