Testcase fixes (#11238)
* Restaurant test records fixed * Fixes for test cases
This commit is contained in:
parent
44734049f5
commit
a9feddbb79
@ -12,9 +12,6 @@ data = {
|
|||||||
'HR',
|
'HR',
|
||||||
'ToDo'
|
'ToDo'
|
||||||
],
|
],
|
||||||
'properties': [
|
|
||||||
{'doctype': 'Item', 'fieldname': 'is_stock_item', 'property': 'default', 'value': 0},
|
|
||||||
],
|
|
||||||
'set_value': [
|
'set_value': [
|
||||||
['Stock Settings', None, 'show_barcode_field', 0]
|
['Stock Settings', None, 'show_barcode_field', 0]
|
||||||
],
|
],
|
||||||
|
@ -8,9 +8,9 @@ import unittest
|
|||||||
|
|
||||||
test_records = [
|
test_records = [
|
||||||
dict(doctype='Restaurant', name='Test Restaurant 1', company='_Test Company 1',
|
dict(doctype='Restaurant', name='Test Restaurant 1', company='_Test Company 1',
|
||||||
invoice_series_prefix='Test-Rest-1-Inv-', defaut_customer='_Test Customer 1'),
|
invoice_series_prefix='Test-Rest-1-Inv-', default_customer='_Test Customer 1'),
|
||||||
dict(doctype='Restaurant', name='Test Restaurant 2', company='_Test Company 1',
|
dict(doctype='Restaurant', name='Test Restaurant 2', company='_Test Company 1',
|
||||||
invoice_series_prefix='Test-Rest-2-Inv-', defaut_customer='_Test Customer 1'),
|
invoice_series_prefix='Test-Rest-2-Inv-', default_customer='_Test Customer 1'),
|
||||||
]
|
]
|
||||||
|
|
||||||
class TestRestaurant(unittest.TestCase):
|
class TestRestaurant(unittest.TestCase):
|
||||||
|
@ -558,5 +558,5 @@ class TestMaterialRequest(unittest.TestCase):
|
|||||||
item_code= %s and warehouse= %s """, (mr.items[0].item_code, mr.items[0].warehouse))[0][0]
|
item_code= %s and warehouse= %s """, (mr.items[0].item_code, mr.items[0].warehouse))[0][0]
|
||||||
self.assertEquals(requested_qty, new_requested_qty)
|
self.assertEquals(requested_qty, new_requested_qty)
|
||||||
|
|
||||||
test_dependencies = ["Currency Exchange"]
|
test_dependencies = ["Currency Exchange", "BOM"]
|
||||||
test_records = frappe.get_test_records('Material Request')
|
test_records = frappe.get_test_records('Material Request')
|
||||||
|
@ -121,8 +121,7 @@ def create_material_request(material_requests):
|
|||||||
mr.update({
|
mr.update({
|
||||||
"company": company,
|
"company": company,
|
||||||
"transaction_date": nowdate(),
|
"transaction_date": nowdate(),
|
||||||
"material_request_type": "Material Transfer" if request_type=="Transfer" else request_type,
|
"material_request_type": "Material Transfer" if request_type=="Transfer" else request_type
|
||||||
"schedule_date": add_days(nowdate(), cint(items[0].lead_time_days))
|
|
||||||
})
|
})
|
||||||
|
|
||||||
for d in items:
|
for d in items:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user