refactor(test): make supplier quotation deterministic

This commit is contained in:
ruthra kumar
2025-07-16 15:25:10 +05:30
parent 1560619fe0
commit cee55a1518
2 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
[
{
"buying_price_list": "_Test Price List",
"company": "_Test Company",
"conversion_rate": 1.0,
"currency": "INR",
"doctype": "Supplier Quotation",
"base_grand_total": 5000.0,
"grand_total": 5000.0,
"is_subcontracted": 0,
"naming_series": "_T-Supplier Quotation-",
"base_net_total": 5000.0,
"items": [
{
"base_amount": 5000.0,
"description": "_Test FG Item",
"doctype": "Supplier Quotation Item",
"item_code": "_Test FG Item",
"item_name": "_Test FG Item",
"parentfield": "items",
"qty": 10.0,
"rate": 500.0,
"uom": "_Test UOM",
"warehouse": "_Test Warehouse - _TC"
}
],
"supplier": "_Test Supplier",
"supplier_name": "_Test Supplier",
"transaction_date": "2013-02-12"
}
]

View File

@@ -14,6 +14,11 @@ from erpnext.tests.utils import ERPNextTestSuite
class TestPurchaseOrder(ERPNextTestSuite):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.load_test_records("Supplier Quotation")
def test_update_child_supplier_quotation_add_item(self):
sq = frappe.copy_doc(self.globalTestRecords["Supplier Quotation"][0])
sq.submit()