Test case fixes for serial no
This commit is contained in:
parent
5365108ef9
commit
6d5c248402
@ -256,7 +256,7 @@ class TestStockEntry(unittest.TestCase):
|
||||
|
||||
# insert a pos invoice with update stock
|
||||
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].item_code = item_code
|
||||
si.get("entries")[0].qty = 5.0
|
||||
@ -663,6 +663,7 @@ class TestStockEntry(unittest.TestCase):
|
||||
|
||||
def test_serial_no_not_exists(self):
|
||||
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.purpose = "Material Issue"
|
||||
se.get("mtn_details")[0].item_code = "_Test Serialized Item"
|
||||
@ -823,8 +824,6 @@ def make_serialized_item():
|
||||
se.submit()
|
||||
return se
|
||||
|
||||
test_records = frappe.get_test_records('Stock Entry')
|
||||
|
||||
def make_stock_entry(item, source, target, qty, incoming_rate=None):
|
||||
s = frappe.new_doc("Stock Entry")
|
||||
if source and target:
|
||||
@ -845,3 +844,5 @@ def make_stock_entry(item, source, target, qty, incoming_rate=None):
|
||||
s.insert()
|
||||
s.submit()
|
||||
return s
|
||||
|
||||
test_records = frappe.get_test_records('Stock Entry')
|
||||
|
Loading…
Reference in New Issue
Block a user