test: Fix test name
- Rename TestSubcontractedItemToBeReceived > TestSubcontractedItemToBeTransferred
This commit is contained in:
parent
d1a13ec050
commit
d48ea663d9
@ -9,12 +9,12 @@ from erpnext.stock.doctype.stock_entry.test_stock_entry import make_stock_entry
|
|||||||
from erpnext.buying.report.subcontracted_raw_materials_to_be_transferred.subcontracted_raw_materials_to_be_transferred import execute
|
from erpnext.buying.report.subcontracted_raw_materials_to_be_transferred.subcontracted_raw_materials_to_be_transferred import execute
|
||||||
import json, frappe, unittest
|
import json, frappe, unittest
|
||||||
|
|
||||||
class TestSubcontractedItemToBeReceived(unittest.TestCase):
|
class TestSubcontractedItemToBeTransferred(unittest.TestCase):
|
||||||
|
|
||||||
def test_pending_and_received_qty(self):
|
def test_pending_and_transferred_qty(self):
|
||||||
po = create_purchase_order(item_code='_Test FG Item', is_subcontracted='Yes')
|
po = create_purchase_order(item_code='_Test FG Item', is_subcontracted='Yes')
|
||||||
make_stock_entry(item_code='_Test Item', target='_Test Warehouse 1 - _TC', qty=100, basic_rate=100)
|
make_stock_entry(item_code='_Test Item', target='_Test Warehouse - _TC', qty=100, basic_rate=100)
|
||||||
make_stock_entry(item_code='_Test Item Home Desktop 100', target='_Test Warehouse 1 - _TC', qty=100, basic_rate=100)
|
make_stock_entry(item_code='_Test Item Home Desktop 100', target='_Test Warehouse - _TC', qty=100, basic_rate=100)
|
||||||
transfer_subcontracted_raw_materials(po.name)
|
transfer_subcontracted_raw_materials(po.name)
|
||||||
col, data = execute(filters=frappe._dict({'supplier': po.supplier,
|
col, data = execute(filters=frappe._dict({'supplier': po.supplier,
|
||||||
'from_date': frappe.utils.get_datetime(frappe.utils.add_to_date(po.transaction_date, days=-10)),
|
'from_date': frappe.utils.get_datetime(frappe.utils.add_to_date(po.transaction_date, days=-10)),
|
||||||
@ -38,7 +38,8 @@ def transfer_subcontracted_raw_materials(po):
|
|||||||
'warehouse': '_Test Warehouse - _TC', 'rate': 100, 'amount': 200, 'stock_uom': 'Nos'}]
|
'warehouse': '_Test Warehouse - _TC', 'rate': 100, 'amount': 200, 'stock_uom': 'Nos'}]
|
||||||
rm_item_string = json.dumps(rm_item)
|
rm_item_string = json.dumps(rm_item)
|
||||||
se = frappe.get_doc(make_rm_stock_entry(po, rm_item_string))
|
se = frappe.get_doc(make_rm_stock_entry(po, rm_item_string))
|
||||||
|
se.from_warehouse = '_Test Warehouse 1 - _TC'
|
||||||
se.to_warehouse = '_Test Warehouse 1 - _TC'
|
se.to_warehouse = '_Test Warehouse 1 - _TC'
|
||||||
se.stock_entry_type = 'Send to Subcontractor'
|
se.stock_entry_type = 'Send to Subcontractor'
|
||||||
se.save()
|
se.save()
|
||||||
se.submit()
|
se.submit()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user