mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 11:19:09 +00:00
Test case fixes for serial no
This commit is contained in:
@@ -256,7 +256,7 @@ class TestStockEntry(unittest.TestCase):
|
|||||||
|
|
||||||
# insert a pos invoice with update stock
|
# insert a pos invoice with update stock
|
||||||
si = frappe.copy_doc(sales_invoice_test_records[1])
|
si = frappe.copy_doc(sales_invoice_test_records[1])
|
||||||
si.is_pos = si.update_stock = 1
|
si.update_stock = 1
|
||||||
si.get("entries")[0].warehouse = "_Test Warehouse - _TC"
|
si.get("entries")[0].warehouse = "_Test Warehouse - _TC"
|
||||||
si.get("entries")[0].item_code = item_code
|
si.get("entries")[0].item_code = item_code
|
||||||
si.get("entries")[0].qty = 5.0
|
si.get("entries")[0].qty = 5.0
|
||||||
@@ -663,6 +663,7 @@ class TestStockEntry(unittest.TestCase):
|
|||||||
|
|
||||||
def test_serial_no_not_exists(self):
|
def test_serial_no_not_exists(self):
|
||||||
self._clear_stock_account_balance()
|
self._clear_stock_account_balance()
|
||||||
|
frappe.db.sql("delete from `tabSerial No` where name in ('ABCD', 'EFGH')")
|
||||||
se = frappe.copy_doc(test_records[0])
|
se = frappe.copy_doc(test_records[0])
|
||||||
se.purpose = "Material Issue"
|
se.purpose = "Material Issue"
|
||||||
se.get("mtn_details")[0].item_code = "_Test Serialized Item"
|
se.get("mtn_details")[0].item_code = "_Test Serialized Item"
|
||||||
@@ -823,8 +824,6 @@ def make_serialized_item():
|
|||||||
se.submit()
|
se.submit()
|
||||||
return se
|
return se
|
||||||
|
|
||||||
test_records = frappe.get_test_records('Stock Entry')
|
|
||||||
|
|
||||||
def make_stock_entry(item, source, target, qty, incoming_rate=None):
|
def make_stock_entry(item, source, target, qty, incoming_rate=None):
|
||||||
s = frappe.new_doc("Stock Entry")
|
s = frappe.new_doc("Stock Entry")
|
||||||
if source and target:
|
if source and target:
|
||||||
@@ -845,3 +844,5 @@ def make_stock_entry(item, source, target, qty, incoming_rate=None):
|
|||||||
s.insert()
|
s.insert()
|
||||||
s.submit()
|
s.submit()
|
||||||
return s
|
return s
|
||||||
|
|
||||||
|
test_records = frappe.get_test_records('Stock Entry')
|
||||||
|
|||||||
Reference in New Issue
Block a user